Skip to content

AbortMultipartUpload endpoint

https://redmine.teklia.com/issues/9153

Requires #1926 (closed)

A new AbortMultipartUpload endpoint as a DELETE /api/v1/multipart/abort/ allows to cancel a multipart upload that had been created earlier, and thus delete all of the already uploaded parts to free up space. The MultipartSerializer itself can be used directly. The endpoint's perform_delete method must:

  • call object.s3_object.MultipartUpload(upload_id).abort()
  • handle botocore.exceptions.ClientError exceptions, returning HTTP 400 or 404 with the e.response["Error"]["Message"] when e.response["Error"]["Code"] == "400" or "404"
  • return HTTP 204 on success.