<p>Headers passed back from S3 have to be set either on object upload or copy. You would have to use S3::copyObject() to copy the object to itself and set the appropriate headers (mentioned here: <a href="https://stackoverflow.com/a/25933113/2040791">https://stackoverflow.com/a/25933113/2040791</a>)</p>

<p>Alternatively, you can use the method mentioned in the same thread and force a download using HTML5, but that won't work on all browsers.</p>

CC BY-SA 3.0
2015-02-28T18:58:39.423Z
2015-02-28T18:58:39.423Z
2017-05-23T12:38:53.957Z
Andris Sevcenko
<p>I have a large set of images, stored on Amazon S3. I would like my users to be able to download the original version of an image, rather then watching it in the browser. I know I can do this with PHP by setting headers and such, and I already have a plugin + controller waiting to do this, but is there an easy way to access the image data stored in S3, or should I do this directly through the S3 Class?</p>

<plugin-development><assets><assetfilemodel><s3>
Can visitors 'force download' images stored on Amazon S3?
# Can visitors 'force download' images stored on Amazon S3?

(Asked by: username_0 on 2015-02-27)

I have a large set of images, stored on Amazon S3. I would like my users to be able to download the original version of an image, rather then watching it in the browser. I know I can do this with PHP by setting headers and such, and I already have a plugin + controller waiting to do this, but is there an easy way to access the image data stored in S3, or should I do this directly through the S3 Class?

**Tags:** plugin-development, assets, assetfilemodel, s3

---

## 1 answers

### Answer by username_1 on 2015-02-28. Score: 1

Headers passed back from S3 have to be set either on object upload or copy. You would have to use S3::copyObject() to copy the object to itself and set the appropriate headers (mentioned here: <https://stackoverflow.com/a/25933113/2040791>)

Alternatively, you can use the method mentioned in the same thread and force a download using HTML5, but that won't work on all browsers.


---

