boto3 icon indicating copy to clipboard operation
boto3 copied to clipboard

add IfMatch and IfNoneMatch to S3Transfer.ALLOWED_UPLOAD_ARGS

Open rittneje opened this issue 1 year ago • 5 comments

Describe the feature

put_object and complete_multipart_upload both accept optional args IfMatch and IfNoneMatch. However, there is no way to currently pass these to upload_file since these parameters are missing from S3Transfer.ALLOWED_UPLOAD_ARGS.

Use Case

They need to be there so we can for example enforce that IfNoneMatch: "*" was specified to prevent overwriting existing files when using upload_file, as described here.

Proposed Solution

No response

Other Information

No response

Acknowledgements

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

SDK version used

n/a

Environment details (OS name and version, etc.)

n/a

rittneje avatar Dec 04 '24 12:12 rittneje

Hi @rittneje, thanks for reaching out and for bringing up the feature request. The team is aware of the feature request. Please refer to an SDK changelog (https://raw.githubusercontent.com/boto/boto3/develop/CHANGELOG.rst) for updates about this going forward. If you have any questions, please let us know. Thank you.

adev-code avatar Dec 09 '24 23:12 adev-code

@adev-code Was the "response-requested" label added in error?

rittneje avatar Dec 10 '24 01:12 rittneje

Currently running into this issue with upload_fileobj

fitz-vivodyne avatar Dec 13 '24 15:12 fitz-vivodyne

Looks like this needs to happen here in https://github.com/boto/s3transfer

fitz-vivodyne avatar Dec 13 '24 15:12 fitz-vivodyne

Thanks for your patience. After talking with the team, IfMatch and IfNoneMatch can be added to the S3Transfer.ALLOWED_UPLOAD_ARGS. I don't have a timeline for implementation at this time, but I'll be leaving this feature request open for tracking purposes, and will let you know if I have any updates. Thanks again for this feature request.

adev-code avatar Mar 11 '25 16:03 adev-code