# S3 클론에 업로드 시 'Broken pipe' 오류 발생 (이름에 é, ï 등 특수문자가 포함된 PDF)

**URL:** <https://meta.discourse.org/t/broken-pipe-error-when-uploading-to-a-s3-clone-a-pdf-with-a-name-containing-e-i-etc/155414>\
**Category:** Bug\
**Created:** [6월 20, 2020, 6:20오전 UTC](https://meta.discourse.org/t/broken-pipe-error-when-uploading-to-a-s3-clone-a-pdf-with-a-name-containing-e-i-etc/155414 "2020-06-20T06:20:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Benjamin\_D](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/benjamin_d/32/277831_2.png) [@Benjamin\_D](https://meta.discourse.org/u/Benjamin_D)\
**Post date:** [6월 20, 2020, 12:13오후 UTC](https://meta.discourse.org/t/broken-pipe-error-when-uploading-to-a-s3-clone-a-pdf-with-a-name-containing-e-i-etc/155414/2 "2020-06-20T12:13:24Z")

</div>

[discourse/lib/file\_store/s3\_store.rb at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/master/lib/file_store/s3_store.rb) 의 62번째 줄

```
options[:content_disposition] = "attachment; filename=\"#{filename}\""

```

content disposition은 다음과 같이 포맷팅되어야 할 수도 있습니다:

```
options[:content_disposition] = ActionDispatch::Http::ContentDisposition.format(
        disposition: "attachment", filename: upload.filename
      )

```

이는 다음 커밋과 유사합니다:

> <https://github.com/discourse/discourse/commit/24877a7b8c3aa445f0969b298ba8a34ac57c7bd6>
>
> Backport of fix from Rails 6: https://github.com/rails/rails/commit/890485cfce4c…361c03a41ec23b0ba187007818cc

이 경우, 이 content\_disposition도 마찬가지일 수 있습니다:

> <https://github.com/discourse/discourse/commit/e5da2d24e543c86868768de235b8eedab1ee6ee1>
>
> This will make it so the original filename is used when downloading all non-imag…e files, bringing S3Store into line with the to\_s3 migration and local storage. Video and audio files will still stream correctly in HTML players as well.
> 
> See https://meta.discourse.org/t/cannot-download-non-image-media-files-original-filenames-lost-when-uploaded-to-s3/152797 for a lot of extra context.

---

_[View the full topic](https://meta.discourse.org/t/broken-pipe-error-when-uploading-to-a-s3-clone-a-pdf-with-a-name-containing-e-i-etc/155414)._
