mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-08 12:58:11 -05:00
[GH-ISSUE #15260] feat: remove s3 uploads from local storage #33042
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @louis-fiori on GitHub (Jun 24, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/15260
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
@tjbck commented on GitHub (Jun 25, 2025):
PR Welcome, however, just so you know when the file is needed it'll be downloaded to the instances.