fix build with older aws

S3: Multipart uploads are now only supported when git-annex is built
with aws-0.16.0 or later, as earlier versions of the library don't
support versioning with multipart uploads.

This will affect the android build, and debian stable also has a too old
aws to support both features at the same time.

This commit was sponsored by Nick Piper on Patreon.
This commit is contained in:
Joey Hess 2018-09-13 09:58:36 -04:00
parent 8daccbc2b3
commit 677038199c
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 4 additions and 1 deletions

View file

@ -211,7 +211,7 @@ storeHelper info h f object p = case partSize info of
r <- sendS3Handle h $ putObject info object rbody
return (mkS3VersionID object (S3.porVersionId r))
multipartupload fsz partsz = do
#if MIN_VERSION_aws(0,10,6)
#if MIN_VERSION_aws(0,16,0)
let startreq = (S3.postInitiateMultipartUpload (bucket info) object)
{ S3.imuStorageClass = Just (storageClass info)
, S3.imuMetadata = metaHeaders info