Skip to content

Commit

Permalink
Chunked uploads handling (danielfrg#80)
Browse files Browse the repository at this point in the history
Prune only if chunked support
  • Loading branch information
pvanliefland committed Aug 31, 2020
1 parent d2abd7e commit fc6fe4f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions s3contents/genericmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,14 @@ def save(self, model, path):
return model

def _save_chunked(self, chunk, model, path):
prune_stale_chunks()

if not CHUNKS_HANDLING:
self.log.error(
"S3contents.GenericManager._save_chunked: not available with Python < 3.7"
)
self.do_error("Chunked file upload in S3/GCS requires Python >= 3.7", 500)

prune_stale_chunks()

if "type" not in model:
self.do_error("No file type provided", 400)
if model["type"] != "file":
Expand Down

0 comments on commit fc6fe4f

Please sign in to comment.