From f628953c330936d68bad0ce86df07adb8b2f70af Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 12 Sep 2018 01:00:51 -0700 Subject: [PATCH] cleanup tmp upload directories --- weed/s3api/filer_multipart.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/weed/s3api/filer_multipart.go b/weed/s3api/filer_multipart.go index a688b917a..73be496d9 100644 --- a/weed/s3api/filer_multipart.go +++ b/weed/s3api/filer_multipart.go @@ -102,6 +102,10 @@ func (s3a *S3ApiServer) completeMultipartUpload(input *s3.CompleteMultipartUploa }, } + if err = s3a.rm(s3a.genUploadsFolder(*input.Bucket), *input.UploadId, true, false, true); err != nil { + glog.V(1).Infof("completeMultipartUpload cleanup %s upload %s: %v", *input.Bucket, *input.UploadId, err) + } + return } @@ -155,6 +159,7 @@ func (s3a *S3ApiServer) listMultipartUploads(input *s3.ListMultipartUploadsInput }) } } + return }