mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
feat: Filter S3 objects using Prefix parameter instead of filtering locally in S3StorageProvider.delete_all_files #4852
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 @jcsaaddupuy on GitHub (Apr 15, 2025).
Check Existing Issues
Problem Description
In S3StorageProvider.delete_all_files, all the files from the bucket are listed, then filtered in python on hte prefix.
boto3S3 client accept aPrefixparameter that allow filtering S3 keys at the S3 api level, instead of fetching all items then filtering locally in python.instead of
we can do
Let me know whaat you think, i'll gladly provide a PR for this change
Desired Solution you'd like
Filtering S3 objects using the
list_objects_v2PrefixparameterAlternatives Considered
No response
Additional Context
No response
@tjbck commented on GitHub (Apr 15, 2025):
PR welcome!
@jcsaaddupuy commented on GitHub (Apr 15, 2025):
Hi !
I've started a fix here https://github.com/jcsaaddupuy/open-webui/tree/feat/12885-use-s3-prefix-parameter
I also started a discussion here https://github.com/open-webui/open-webui/discussions/12891 for follow up