fix upload failures when using AWS S3

This commit is contained in:
tokibi 2020-12-16 20:13:28 +09:00 committed by Lena Fuhrimann
parent 506487e3e2
commit 273712b342

View file

@ -26,7 +26,7 @@ func HandleCreateObject(s3 S3) http.HandlerFunc {
defer file.Close()
opts := minio.PutObjectOptions{ContentType: "application/octet-stream"}
_, err = s3.PutObject(bucketName, header.Filename, file, 1, opts)
_, err = s3.PutObject(bucketName, header.Filename, file, -1, opts)
if err != nil {
handleHTTPError(w, fmt.Errorf("error putting object: %w", err))
return