fix:admin

This commit is contained in:
lan
2023-01-16 20:20:46 +08:00
parent a8052c647d
commit b6c0bc04fa
5 changed files with 81 additions and 84 deletions
+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):