diff --git a/s3contents/genericmanager.py b/s3contents/genericmanager.py index 2982f96..958adb6 100644 --- a/s3contents/genericmanager.py +++ b/s3contents/genericmanager.py @@ -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":