Skip to content

Conversation

@ShirasawaSama
Copy link

Refactor file reading logic to use Storage provider and pathlib for file path handling.

Currently, using S3 as file storage prevents files from being retrieved. For example, when generating images using the Gemini 3 Image Pro model, no image context information will be available.

Therefore, I modified the code to follow the same logic as the /v1/files/{file-id}/content API:

https://github.com/open-webui/open-webui/blob/main/backend/open_webui/routers/files.py#L559

Refactor file reading logic to use Storage provider and pathlib for file path handling.

Signed-off-by: Shirasawa <764798966@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant