apache / opendal

Apache OpenDAL: One Layer, All Storage.
https://opendal.apache.org
Apache License 2.0
3.46k stars 486 forks source link

new feature: content-length header for presigned write #5299

Open xangelix opened 2 weeks ago

xangelix commented 2 weeks ago

Feature Description

S3's API supports signing the content-length and content-length-range headers https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html

Problem and Solution

This prevents an end-user from uploading some theoretical infinite amount of bytes using a presigned write.

Additional Context

I'm not sure what other services might support this.

Are you willing to contribute to the development of this feature?

Xuanwo commented 2 weeks ago

Hi, @xangelix. Presign write is not implemented via POST, so I'm afraid we can't add such a restriction.