Uploading a file using Amplify.Storage.uploadFile doesn't appear to support specifying a checksum algorithm. #3802
Labels
feature-request
Request a new feature
storage
Issues related to the Storage category
transferred
This issue was transferred from another Amplify project
Is this related to a new or existing framework?
No response
Is this related to a new or existing API?
Storage
Is this related to another service?
No response
Describe the feature you'd like to request
When using the Amplify.Storage.uploadFile function to upload a file, this message appear at the start of each upload. This occurs when implementing a Swift app that is running on a iPad that is running iOS 17.5.1.
While the file uploads correctly, it's preferable to be able to configure the checksum algorithm as to ensure that contents delivered into the AWS S3 bucket matches the checksum of the original file.
Describe the solution you'd like
The AWS SDK Swift
CreateMultipartUploadRequest
supports specifying the checksum algorithm, see below:CreateMultipartUploadRequest.builder() .bucket(BUCKET) .key(FILE_NAME) .checksumAlgorithm(ChecksumAlgorithm.SHA256) .build();
My request is for AWS Amplify Storage support this.
My preference is being able to provide a parameter/option to the
uploadFile
,uploadData
and other functions which transfer data to/from the AWS S3 bucket.Alternative solutions is to define the checksum algorithm as part of the AWS Amplify backend definition (storage/resource.ts) or being able to configure the Amplify.Storage instance to a checksum algorithm.
Describe alternatives you've considered
As mentioned, while I could use AWS Amplify trap door to get the S3Client instance to the AWS S3 bucket and to use
CreateMultipartUploadRequest
as to specify the checksum algorithm.However, my mindset is that AWS Amplify Storage was conceived to simplify transferring of data and implementing a multi-part upload would be excessive.
Additional context
My opinion on the matter is that a checksum algorithm should be applied by default, since it a good practice for ensuring data transfer was done correctly.
For situations where it's not wanted, such as it introduces a performance overhead, then those applications could opt-out.
Is this something that you'd be interested in working on?
The text was updated successfully, but these errors were encountered: