feat: remove s3 uploads from local storage #15286
Replies: 2 comments 2 replies
-
|
PR Welcome, however, just so you know when the file is needed it'll be downloaded to the instances. |
Beta Was this translation helpful? Give feedback.
-
|
I'm interested in digging into this and happy to help move it forward. We'd very much like to not store data on our openwebui instances. Step 1 — Identify where raw file data is actually neededSome cases will require a local copy. For those, we should define what happens after use. Two main options:
For everything else, we can stream directly from S3. File downloads by users fit here, and maybe some integrations too. Step 2 — Handle these case-by-caseOnce we’ve mapped the use cases, we can work toward a reference implementation and reuse it where needed. Open to feedback on this approach or alternative angles to explore. @tjbck , I'm especially interested in hearing if you have any strong opinion e.g. to avoid streaming directly for downloads, etc. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Check Existing Issues
Problem Description
We’re currently using the S3 storage provider in OpenWebUI to comply with internal data retention and compliance requirements. Specifically, all uploaded files must reside exclusively in S3.
However, we noticed that while the S3 provider does upload the file to S3 successfully, the file also remains on the local container’s storage. This creates a compliance issue for us, as files must not persist outside of S3.
Desired Solution you'd like
We propose adding a configuration option to automatically delete the local file after a successful upload to S3.
The update could be made in the storage/provider.py file, within the upload_file method of the S3StorageProvider.
This could be controlled via an environment variable (e.g., S3_DELETE_LOCAL_AFTER_UPLOAD=True), or a config flag.
Alternatives Considered
We are currently manually deleting the files after upload via a patch, but this is not ideal or maintainable long-term.
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions