From 6027c1322755a6787ed482117425f06b2024dfac Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Sun, 3 Nov 2024 01:07:43 -0800 Subject: [PATCH] fix: s3 file path --- backend/open_webui/storage/provider.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/open_webui/storage/provider.py b/backend/open_webui/storage/provider.py index a3168ead8..76e4fc48f 100644 --- a/backend/open_webui/storage/provider.py +++ b/backend/open_webui/storage/provider.py @@ -51,7 +51,10 @@ class StorageProvider: try: self.s3_client.upload_file(file_path, self.bucket_name, filename) - return open(file_path, "rb").read(), file_path + return ( + open(file_path, "rb").read(), + "s3://" + self.bucket_name + "/" + filename, + ) except ClientError as e: raise RuntimeError(f"Error uploading file to S3: {e}")