refactor: use dify_config to replace legacy usage of flask app's config (#9089)

This commit is contained in:
Bowen Liang 2024-10-22 11:01:32 +08:00 committed by GitHub
commit 4d9160ca9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 221 additions and 207 deletions

View file

@ -3,16 +3,12 @@
from abc import ABC, abstractmethod
from collections.abc import Generator
from flask import Flask
class BaseStorage(ABC):
"""Interface for file storage."""
app = None
def __init__(self, app: Flask):
self.app = app
def __init__(self): # noqa: B027
pass
@abstractmethod
def save(self, filename, data):