update:存储
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# @Time : 2023/8/15 09:51
|
||||
# @Author : Lan
|
||||
# @File : settings.py
|
||||
# @Software: PyCharm
|
||||
from pathlib import Path
|
||||
|
||||
data_root = Path('./data')
|
||||
if not data_root.exists():
|
||||
data_root.mkdir(parents=True, exist_ok=True)
|
||||
+2
-3
@@ -8,15 +8,14 @@ import time
|
||||
|
||||
import aioboto3
|
||||
from fastapi import UploadFile
|
||||
from pathlib import Path
|
||||
|
||||
from core.settings import data_root
|
||||
from apps.base.models import FileCodes
|
||||
|
||||
|
||||
class SystemFileStorage:
|
||||
def __init__(self):
|
||||
self.chunk_size = 256 * 1024
|
||||
self.root_path = Path('./data')
|
||||
self.root_path = data_root
|
||||
self.token = '123456'
|
||||
|
||||
def _save(self, file, save_path):
|
||||
|
||||
Reference in New Issue
Block a user