upload files

This commit is contained in:
Plachta
2023-02-19 22:25:37 +08:00
parent 9cb391af38
commit fc838f7e5f
+4 -1
View File
@@ -8,4 +8,7 @@ if not os.path.exists(upload_path):
os.mkdir(upload_path)
for filename in uploaded.keys():
#将上传的文件移动到指定的位置上
shutil.move(os.path.join(basepath, filename), os.path.join(upload_path, "custom_character_voice.zip"))
if filename.endswith(".zip"):
shutil.move(os.path.join(basepath, filename), os.path.join(upload_path, "custom_character_voice.zip"))
elif filename.endswith(".rar"):
shutil.move(os.path.join(basepath, filename), os.path.join(upload_path, "custom_character_voice.rar"))