mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 03:32:23 +08:00
This reverts commit d170d78530
.
This commit is contained in:
parent
5f12c17355
commit
7a2395cd63
|
@ -4,6 +4,7 @@ from collections.abc import Generator
|
|||
import boto3
|
||||
from botocore.client import Config
|
||||
from botocore.exceptions import ClientError
|
||||
from flask import Flask
|
||||
|
||||
from extensions.storage.base_storage import BaseStorage
|
||||
|
||||
|
@ -13,8 +14,8 @@ logger = logging.getLogger(__name__)
|
|||
class AwsS3Storage(BaseStorage):
|
||||
"""Implementation for Amazon Web Services S3 storage."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, app: Flask):
|
||||
super().__init__(app)
|
||||
app_config = self.app.config
|
||||
self.bucket_name = app_config.get("S3_BUCKET_NAME")
|
||||
if app_config.get("S3_USE_AWS_MANAGED_IAM"):
|
||||
|
|
|
@ -2,6 +2,7 @@ import io
|
|||
from collections.abc import Generator
|
||||
from pathlib import Path
|
||||
|
||||
from flask import Flask
|
||||
from supabase import Client
|
||||
|
||||
from extensions.storage.base_storage import BaseStorage
|
||||
|
@ -10,8 +11,8 @@ from extensions.storage.base_storage import BaseStorage
|
|||
class SupabaseStorage(BaseStorage):
|
||||
"""Implementation for supabase obs storage."""
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, app: Flask):
|
||||
super().__init__(app)
|
||||
app_config = self.app.config
|
||||
self.bucket_name = app_config.get("SUPABASE_BUCKET_NAME")
|
||||
self.client = Client(
|
||||
|
|
Loading…
Reference in New Issue
Block a user