Open jdkealy opened 7 years ago
I've tried the following
(dissoc
(s3b/sign-upload
{:file-name "foobar.jpg"
:mime-type "jpg"
:Content-Disposition "attachment"
:headers {:metadata {:Content-Disposition "attachment"}}
}
{:bucket "blabla"
:aws-key "blabla"
:aws-zone "us-east-1"
:aws-secret-key "blabla"})
:action
:api_key)
no luck... setting the content disposition then in CLJS throws the error that the params don't match the presigned url.
I'm not really using the pipeline functions so correct me if I'm wrong I should be able to do this?
(s3b/sign-upload (assoc newp :metadata {:content-disposition "attachment"}) {:bucket "bucket" :aws-key "abc" :aws-zone "us-east-1" :aws-secret-key "defg"})
and then add another form field for metadata on the cljs side of things ?
I've done the above on the CLJ side of things, then in cljs i have tried appending the params with :metadata {:content-disposition "attachment"} but get back from amazon:
Invalid according to Policy: Extra input fields: :metadata Invalid according to Policy: Extra input fields: :content-disposition
I realized then I needed to assoc "metadata" instead of :metadata but still get
Invalid according to Policy: Extra input fields: content-disposition Invalid according to Policy: Extra input fields: metadata
Still pretty confused :/
Hi,
I've been trying for a few hours now to set the metadata "Content-Disposition": "attachment" in S3. I'm trying to enforce that all images / videos are downloaded when one navigates to them in s3. I can't seem to get this to work with either header-fn or with metadata. Do you have any suggestions on how to set this header for S3 objects? Thanks!