jack 1 semana atrás
pai
commit
9d1d0f3b95
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      app/services/file/impl/r2r_file.py

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

@@ -49,8 +49,8 @@ class R2RFileService(OSSFileService):
                     await f.write(content)
 
             # storage.save_from_path(filename=file_key, local_file_path=tmp_file_path)
-            r2r = await R2R()
-            r2r.init()
+            r2r = R2R()
+            await r2r.init()
             fileinfo = await r2r.ingest_file(
                 file_path=tmp_file_path,
                 metadata={"file_key": file_key, "title": file.filename},