dapr / components-contrib

Community driven, reusable components for distributed apps
Apache License 2.0
548 stars 480 forks source link

AWS S3 Binding should be able to create presigned urls that can be used for file uploads. #3602

Open TimothyHarrelson opened 1 week ago

TimothyHarrelson commented 1 week ago

Describe the feature

AWS S3 has the capability to create presigned urls which can be used at a later time to upload a file using HTTP Put requests. Currently the S3 binding in Dapr can only create files in s3 if you already have the file data on hand, and cannot generate these upload presigned urls.

This feature would allow services to hand out the presigned url to users rather than uploading the file themselves, which can simplify such services when handling large files, and allowing these services to avoid having to provision sufficient resources to handle the load of receiving or processing large files.

This new operation on the s3 binding should allow for the Content-Type metadata, as the HTTP Put request to upload the file using the presigned url must match the content type used for generate the presigned url. The data or metadata should also allow for the file name, bucket, and key to be passed in, similar to the existing create operation.

Release Note

RELEASE NOTE: ADD New operation for the s3 binding to allow for presigned urls that can be used to upload files.