Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Content-MD5 header irrespective of objectlock. #13395

Open
2 tasks
sushpatg opened this issue May 17, 2024 · 4 comments
Open
2 tasks

Support for Content-MD5 header irrespective of objectlock. #13395

sushpatg opened this issue May 17, 2024 · 4 comments
Labels
feature-request Request a new feature Storage Related to Storage components/category

Comments

@sushpatg
Copy link

sushpatg commented May 17, 2024

Is this related to a new or existing framework?

React

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

To add ContentMD5 header while making request irrespective of objectlock.

Describe the solution you'd like

Currently we have Pull request - 11611 where Content-MD5 header is supported when ObjectLock is enabled.

I was able to see ContentMD5header if isObjectLockEnabled: true in Storage.configure(). But have not enabled object lock for S3 bucket.

Looking for solution to pass pass ContentMD5 header irrespective of objectlock.

Describe alternatives you've considered

I was able to see ContentMD5header if isObjectLockEnabled: true in Storage.configure(). But have not enabled object lock for S3 bucket.


Amplify.configure(config);
Storage.configure(
  {
    AWSS3:
    {
      bucket: config.aws_user_files_s3_bucket, //REQUIRED -  Amazon S3 bucket name
      region: config.aws_user_files_s3_bucket_region, //OPTIONAL -  Amazon service region
      isObjectLockEnabled: true
    }
  }
)

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
@sushpatg sushpatg added the pending-triage Issue is pending triage label May 17, 2024
@cwomack cwomack self-assigned this May 17, 2024
@cwomack cwomack added feature-request Request a new feature Storage Related to Storage components/category and removed pending-triage Issue is pending triage labels May 17, 2024
@HuiSF
Copy link
Contributor

HuiSF commented May 17, 2024

Hi @sushpatg thanks for making this feature request. In your use cases, do you compute the MD5 digest yourself?

@cwomack
Copy link
Contributor

cwomack commented May 17, 2024

@sushpatg, can you confirm that what's being asked for in this issue is support of the ContentMD5 option within Storage (as detailed here in v5 docs) for the v6 uploadData API? Or was there another use case or API that you're trying to use for this?

@cwomack cwomack added the pending-response Issue is pending response from the issue requestor label May 17, 2024
@sushpatg
Copy link
Author

@cwomack, as per my testing ContentMD5 does not work even in v5 unless one has configured isObjectLockEnabled to true.

Also as per the below excerpt from S3 documentation, we should be able to pass ContentMD5 header manually(calculated outside) or if not passed amplify-js should calculate it for us

When you upload an object, you can optionally include a precalculated checksum as part of your request. Amazon S3 compares the provided checksum to the checksum that it calculates by using your specified algorithm. If the two values don't match, Amazon S3 reports an error

@github-actions github-actions bot removed the pending-response Issue is pending response from the issue requestor label May 17, 2024
@sushpatg
Copy link
Author

Hi @sushpatg thanks for making this feature request. In your use cases, do you compute the MD5 digest yourself?

Yes, we can calculate it ourselves

@cwomack cwomack removed their assignment May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature Storage Related to Storage components/category
Projects
None yet
Development

No branches or pull requests

3 participants