mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-18 07:15:20 +00:00
fix: s3 file path
This commit is contained in:
parent
0c6453078e
commit
6027c13227
1 changed files with 4 additions and 1 deletions
|
|
@ -51,7 +51,10 @@ class StorageProvider:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.s3_client.upload_file(file_path, self.bucket_name, filename)
|
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:
|
except ClientError as e:
|
||||||
raise RuntimeError(f"Error uploading file to S3: {e}")
|
raise RuntimeError(f"Error uploading file to S3: {e}")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue