# 비이미지 업로드 시 S3 CDN URL이 사용되지 않음

**URL:** https://meta.discourse.org/t/s3-cdn-url-not-being-used-on-non-image-uploads/175332
**Category:** Bug
**Created:** [1월 7, 2021, 1:24오전 UTC](https://meta.discourse.org/t/s3-cdn-url-not-being-used-on-non-image-uploads/175332 "2021-01-07T01:24:44Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![martin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/martin/32/491371_2.png) [@martin](https://meta.discourse.org/u/martin)
#### Post date: [3월 2, 2021, 1:55오전 UTC](https://meta.discourse.org/t/s3-cdn-url-not-being-used-on-non-image-uploads/175332/4 "2021-03-02T01:55:55Z")

</div>

조금 까다로운 문제입니다. 방금 확인해 보았는데, 기본적으로 "강제 다운로드(force download)"를 수행할 때는 항상 사전 서명된 URL(presigned URL)을 통해 S3에서 다운로드를 진행합니다. 첨부파일 링크를 클릭하거나 이미지에서 다운로드 버튼을 클릭할 때 이 강제 다운로드가 발생하게 됩니다. 이렇게 함으로써 적절한 content-disposition 헤더를 추가할 수 있습니다:

```plaintext
attachment; filename="#{upload.original_filename}"; filename*=UTF-8''#{upload.original_filename}

```

CDN URL이 이러한 방식으로 동작하도록 하는 것은 불가능하다고 생각합니다. 이미지의 경우 CDN URL은 인라인으로 표시할 때만 사용되며, 다운로드할 때는 사용되지 않습니다. 또한 개인 ACL을 가진 보안 이미지 및 첨부파일의 경우 사전 서명된 URL을 반드시 사용해야 합니다.

---

_[View the full topic](https://meta.discourse.org/t/s3-cdn-url-not-being-used-on-non-image-uploads/175332)._
