plugin :upload_options, store: -> (io, context) do { sse_customer_algorithm: 'AES256', sse_customer_key: context[:record].sse_customer_key, sse_customer_key_md5: context[:record].sse_customer_key_md5 } end
--
You received this message because you are subscribed to the Google Groups "Shrine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-shrine...@googlegroups.com.
To post to this group, send email to ruby-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-shrine/2a627b19-e249-405e-996d-ca9f5e0254e7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Aws::S3::Errors::BadRequest
You can generate a presigned URL that can be used for operations such as upload a new object, retrieve an existing object, or object metadata. Presigned URLs support the SSE-C as follows:
When creating a presigned URL, you must specify the algorithm using the x-amz-server-side-encryption-customer-algorithm in the signature calculation.
When using the presigned URL to upload a new object, retrieve an existing object, or retrieve only object metadata, you must provide all the encryption headers in your client application.
Note
For non-SSE-C objects, you can generate a presigned URL and directly paste that into a browser, for example to access the data.
However, this is not true for SSE-C objects because in addition to the presigned URL, you also need to include HTTP headers that are specific to SSE-C objects. Therefore, you can use the presigned URL for SSE-C objects only programmatically.
s3_object = @document.file.storage.object(@document.file.id) file = s3_object.get(@document.sse_options) body = file.body.read
--
You received this message because you are subscribed to the Google Groups "Shrine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ruby-shrine...@googlegroups.com.
To post to this group, send email to ruby-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ruby-shrine/72d1192a-a3bb-48b8-84f8-1ea182d7a6b8%40googlegroups.com.