rails icon indicating copy to clipboard operation
rails copied to clipboard

Is it possible to add s3 direct upload policies with active storage?

Open imanpalsingh opened this issue 1 year ago • 1 comments

In my current implementation, to add file upload size validations directly with S3 I am using policies and setting content-length-range in them.

This request looks something like

policy: eyJleHBpcmF0aW9uIjoiMjAyMi0wNi0yMl....
success_action_status: 201
X-Amz-Algorithm: AWS4-HMAC-SHA256
X-Amz-Credential: 123/20220621/us-east-1/s3/aws4_request
X-Amz-Date: 20220621T161259Z
X-Amz-Signature: 7d309f63646082d49e52ddf0b38...
X-Requested-With: xhr

When I perform a s3 direct upload with active storage, this is what gets sent with the request by default.

Screenshot 2022-06-21 at 9 52 30 PM

Is it possible for me to add policies in the direct upload with active storage ?

imanpalsingh avatar Jun 21 '22 16:06 imanpalsingh

This issue has been automatically marked as stale because it has not been commented on for at least three months. The resources of the Rails team are limited, and so we are asking for your help. If you can still reproduce this error on the 7-0-stable branch or on main, please reply with all of the information you have about it in order to keep the issue open. Thank you for all your contributions.

rails-bot[bot] avatar Sep 21 '22 00:09 rails-bot[bot]