# S3 upload: Bypass Discourse local storage

**URL:** <https://meta.discourse.org/t/s3-upload-bypass-discourse-local-storage/92275>\
**Category:** Product Support\
**Created:** [July 13, 2018, 2:23pm UTC](https://meta.discourse.org/t/s3-upload-bypass-discourse-local-storage/92275 "2018-07-13T14:23:47Z")\
**Posts on this page:** 6\
**Page:** 1

## AI-generated summary

The discussion revolves around bypassing Discourse's local storage to directly upload files to S3. [amoncadot](/t/-/92275/1) initiated the conversation, seeking a way to upload images directly to S3 without storing them locally first. However, [schleifer](/t/-/92275/2) stated that this would require significant rework of the upload handling. [sam](/t/-/92275/6) expressed interest in implementing direct S3 uploads using a ticket system but noted that it's not a priority in the next few months. Meanwhile, [supermathie](/t/-/92275/7) announced that a project to improve file uploads in Discourse is now active, potentially addressing this issue.

<div class="post-metadata">

**Author:** ![amoncadot](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@amoncadot](https://meta.discourse.org/u/amoncadot)\
**Post date:** [July 13, 2018, 2:23pm UTC](https://meta.discourse.org/t/s3-upload-bypass-discourse-local-storage/92275/1 "2018-07-13T14:23:47Z")

</div>

Hello,

We would like our users to upload files (images specifically but hopefully video later), however since we are running Discourse using Docker, there’s no point in Discourse storing the files locally before the files are sent to S3.

Is there anyway we can bypass Discourse’s local storage and just fire the images off to S3 straight away when someone uploads a file?

Thanks,  
Amoncadot

---

<div class="post-metadata">

**Author:** ![schleifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schleifer/32/86416_2.png) [@schleifer](https://meta.discourse.org/u/schleifer)\
**Post date:** [July 13, 2018, 3:26pm UTC](https://meta.discourse.org/t/s3-upload-bypass-discourse-local-storage/92275/2 "2018-07-13T15:26:39Z")

</div>

> [@amoncadot](#):
>
> Is there anyway we can bypass Discourse’s local storage and just fire the images off to S3 straight away when someone uploads a file?

No. The upload handling would have to be significantly reworked to go straight to S3.

---

<div class="post-metadata">

**Author:** ![amoncadot](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@amoncadot](https://meta.discourse.org/u/amoncadot)\
**Post date:** [August 7, 2018, 1:16pm UTC](https://meta.discourse.org/t/s3-upload-bypass-discourse-local-storage/92275/3 "2018-08-07T13:16:36Z")

</div>

Hi Andrew,

Great, thanks for your reply!

---

<div class="post-metadata">

**Author:** ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)\
**Post date:** [May 13, 2019, 5:13am UTC](https://meta.discourse.org/t/s3-upload-bypass-discourse-local-storage/92275/6 "2019-05-13T05:13:00Z")

</div>

I would like us to get to direct s3 uploads using some sort of ticket system. The big problem though is that this would only be useful for attachments, it is critical all images go via the app.

For images we always do a bit of magic first, ensuring giant PNGs turn into JPEGS and such.

I don’t see us working on this in the next few months at least.

---

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [November 30, 2021, 5:08pm UTC](https://meta.discourse.org/t/s3-upload-bypass-discourse-local-storage/92275/7 "2021-11-30T17:08:31Z")

</div>

This is now an active project:

> [@A new era for file uploads in Discourse](https://meta.discourse.org/t/a-new-era-for-file-uploads-in-discourse/210469):
>
> You may have noticed over the past several months many commits related to uploads in Discourse core. This has been part of an overall effort within core to replace usages of [jQuery file upload](https://github.com/blueimp/jQuery-File-Upload) from our codebase, as part of an even broader overall effort to replace usages of jQuery itself from our codebase. jQuery file uploader is a very old project, and has been part of Discourse core since almost the beginning. I think I’ve used it for my whole career in other projects as well. But it’s time to…

---

<div class="post-metadata">

**Author:** ![supermathie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/supermathie/32/507518_2.png) [@supermathie](https://meta.discourse.org/u/supermathie)\
**Post date:** [December 1, 2021, 5:09pm UTC](https://meta.discourse.org/t/s3-upload-bypass-discourse-local-storage/92275/8 "2021-12-01T17:09:08Z")

</div>

Closed on December 1, 2021, 5:09pm UTC

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
