update:存储

This commit is contained in:
lan
2023-08-15 10:05:50 +08:00
parent a990f92b43
commit da764c08b0
5 changed files with 13 additions and 6 deletions
+9
View File
@@ -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
View File
@@ -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):