amplify-js icon indicating copy to clipboard operation
amplify-js copied to clipboard

Allow options for generating CheckSum while uploading object using Storage category (i.e. CRC-32, SHA-256, etc.)

Open muvashi opened this issue 2 years ago • 3 comments

Is this related to a new or existing framework?

Angular, React, React Native, Vue, Web Components, Next.js

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 S3 PubObjectCommand API, we can specify the CheckSumAlgorithm which generate the checksum in S3 that can be used later.

However, there is no option to generate the checksum via Amplify storage API call.

Describe the solution you'd like

Option to pass ChecksumAlgorithm while using Storage.put() API call.

Describe alternatives you've considered

.

Additional context

No response

Is this something that you'd be interested in working on?

  • [ ] 👋 I may be able to implement this feature request
  • [ ] ⚠️ This feature might incur a breaking change

muvashi avatar Aug 10 '23 15:08 muvashi

Thanks for quick action on that ticket.

Do you know how long it might take? I need to put something in our system.

wiewiur667 avatar Aug 14 '23 08:08 wiewiur667

Hello, @wiewiur667 👋 and thank you for opening this issue. I've marked it as a feature request at this time because we do not currently support passing ChecksumAlgorithm while calling the Storage.put() API. I'll review this with the team internally and provide updates on any progress as it's made.

cwomack avatar Aug 14 '23 21:08 cwomack

@cwomack Any news from the team on this? I'm currently using Storage.put in our React Native app for image upload, and sometimes corrupted images make it through. The ability to pass a pre-calculated checksum is something we'd love to try.

tlmader avatar Nov 06 '23 16:11 tlmader

@muvashi and @tlmader, we just released the Storage Browser connected component within the Amplify UI library that will support crc32 checksum. Also, the uploadData API in v6 of Amplify will support checksumAlgorithm: 'crc-32' as an option (not documented, but we'll get that updated).

Can you let us know if the two of these updates are sufficient for your use cases? Thanks.

cwomack avatar Dec 12 '24 20:12 cwomack

Is there any plan to support other checksum algorithms (SHA-1, SHA-256)?

eliottparis avatar Mar 19 '25 10:03 eliottparis