"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
backend/s3: Fail fast multipart upload
Michał Matczuk19a4d74ee7f4
diff --git a/backend/s3/s3.go b/backend/s3/s3.goindex 07bc8780b..99641874b 100644--- a/backend/s3/s3.go+++ b/backend/s3/s3.go@@ -2165,6 +2165,12 @@ func (o *Object) uploadMultipart(ctx context.Context, req *s3.PutObjectInput, sibuf = make([]byte, partSize)}+ // Fail fast, in case an errgroup managed function returns an error+ // gCtx is cancelled. There is no point in uploading all the other parts.+ if gCtx.Err() != nil {+ break+ }+// Read the chunkvar n intn, err = readers.ReadFill(in, buf) // this can never return 0, nil