fix:admin

This commit is contained in:
lan committed 2023-01-16 22:53:39 +08:00
1 parent a8052c647d
commit b6c0bc04fa
5 files changed
+81 -84

No files matched your search

+2
View File
@@ -58,6 +58,8 @@ class AliyunFileStorage:
upload_filepath = settings.DATA_ROOT + str(now)
await asyncio.to_thread(self._save, upload_filepath, file.file)
self.upload_file(upload_filepath, remote_filepath)
remote_filepath = remote_filepath.strip(f"https://{settings.BUCKET_NAME}.{settings.OSS_ENDPOINT}/")
self.upload_file(upload_filepath, remote_filepath)
await asyncio.to_thread(os.remove, upload_filepath)
async def delete_files(self, texts):