s3store: Accept alternate error response from DigitalOcean Spaces (#507)
* fix digitalocean spaces fetch * remove log * remove log * remove info.Size check * Add comment * Delete .gitignore Co-authored-by: Marius <marius.kleidl@gmail.com>
This commit is contained in:
parent
dd44267c08
commit
16a3747ec4
|
@ -498,7 +498,9 @@ func (upload s3Upload) fetchInfo(ctx context.Context) (info handler.FileInfo, er
|
||||||
// when the multipart upload has already been completed or aborted. Since
|
// when the multipart upload has already been completed or aborted. Since
|
||||||
// we already found the info object, we know that the upload has been
|
// we already found the info object, we know that the upload has been
|
||||||
// completed and therefore can ensure the the offset is the size.
|
// completed and therefore can ensure the the offset is the size.
|
||||||
if isAwsError(err, "NoSuchUpload") {
|
// AWS S3 returns NoSuchUpload, but other implementations, such as DigitalOcean
|
||||||
|
// Spaces, can also return NoSuchKey.
|
||||||
|
if isAwsError(err, "NoSuchUpload") || isAwsError(err, "NoSuchKey") {
|
||||||
info.Offset = info.Size
|
info.Offset = info.Size
|
||||||
return info, nil
|
return info, nil
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue