Skip to content

Upload utility class API should allow us to have FULL_OBJECT checksum check #6891

@kasir-barati

Description

@kasir-barati

Describe the feature

I need to check the uploaded file's integrity. I get an stream of data, so I was also hoping to see a more intuitive API. I mean right now I have to calculate the checksum of the entire file first since I need it when I am instantiating a new instance of this class.

It is somewhat related to this issue: #6742

Use Case

What this means in a real world application is that my client has to read the file twice which does not make sense;

  1. I am gonna ask for the checksum (need it here):
  2. They will stream the file!
new Upload({
  ...,
  params: {
    ChecksumCRC32: "some checksum",
    Body: passThroughStream
  }
})

So it would be great if we could just pass the checksum for a FULL_OBJECT checksum check at the end.

Proposed Solution

new Upload({
  ...,
  params: {
    ChecksumCRC32: "some checksum",
    Body: passThroughStream,
    ChecksumType: "FULL_OBJECT",
  }
})

So now here and other places you can do a simple check, if ChecksumType is FULL_OBJECT you can skip attaching this params to the request.

Same can be applied to the rest of the places you're simply spreading whatever developer passes to the params.

Other Information

I like to contribute but to me your codebase looked like it's been generated from a python code. So I am not entirely sure how this SDK is being developed and maintained.

Note

Please take a look at my repo: https://github.com/kasir-barati/bugs/tree/aws-s3-multipart-completion-error

There you can see how ugly Upload's interface is right now. Especially this example: https://github.com/kasir-barati/bugs/blob/1149c73557b939a911ec4ec999c8430aa99124f0/upload1.ts

And I really like to know when do you think you can address this feature request.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

SDK version used

3.749.0

Environment details (OS name and version, etc.)

Linux, Ubuntu 24.04.01

Metadata

Metadata

Assignees

Labels

feature-requestNew feature or enhancement. May require GitHub community feedback.p2This is a standard priority issuequeuedThis issues is on the AWS team's backlog

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions