jack 5 月之前
父节点
当前提交
52571f504c
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/services/file/impl/r2r_file.py

+ 1 - 1
app/services/file/impl/r2r_file.py

@@ -36,7 +36,7 @@ class R2RFileService(OSSFileService):
         # if ext_file is not None:
         #     # TODO: 文件去重策略
         #     return ext_file
-        file_extension = Path(filename).suffix
+        file_extension = Path(file.filename).suffix
         file_key = f"{uuid.uuid4()}{file_extension}"
         print(file_key)
         # file_key = f"{uuid.uuid4()}-{file.filename}"