# העלאות S3 - שימוש ב-CDN עבור קבצי PDF?

**URL:** <https://meta.discourse.org/t/s3-uploads-using-cdn-for-pdfs/213218>\
**Category:** Bug\
**Created:** [27 בדצמבר,‏ 2021,‏ 5:34pm UTC](https://meta.discourse.org/t/s3-uploads-using-cdn-for-pdfs/213218 "2021-12-27T17:34:49Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Beakerton](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/beakerton/32/244679_2.png) [@Beakerton](https://meta.discourse.org/u/Beakerton)\
**Post date:** [27 בדצמבר,‏ 2021,‏ 5:34pm UTC](https://meta.discourse.org/t/s3-uploads-using-cdn-for-pdfs/213218/1 "2021-12-27T17:34:50Z")

</div>

Hi All,

I just enabled S3 uploads on my Discourse instance, configured with a Cloudfront CDN. I just tested uploading an image and a PDF file as attachments into posts and they are correctly uploaded into the S3 bucket. However, inspecting the page where both are shown, I see that the PDF does not use the CDN link, but the image does.

For the image, the img src points to the CDN, which the browser uses to load the thumbnail.

For the PDF file, the link src points to a relative URL (/uploads/short-url/xxxxxxxxxxxxx.pdf), which seems to redirect to the file in my actual S3 bucket (not the CDN).

Is this expected? This is my first time using a CDN, so perhaps one typically doesn’t serve larger files through it? I just want to make sure that I have all my settings correct and working before migrating all older posts to S3.

Thank you!

---

_[View the full topic](https://meta.discourse.org/t/s3-uploads-using-cdn-for-pdfs/213218)._
