Skip to content

Commit a23b515

Browse files
committed
[feat]: 增加文献统计和OCS存储
1 parent d980244 commit a23b515

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/api/v1/endpoints/article.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ async def self_folder_to_recycle_bin(folder_id: int = Query(...), db: AsyncSessi
8282
@router.post("/annotateSelfArticle", response_model="dict")
8383
async def annotate_self_article(article_id: int = Query(...), article: UploadFile = File(...)):
8484
# 将新文件存储到云存储位置
85+
os.makedirs("/lhcos-data", exist_ok=True)
8586
save_path = os.path.join("/lhcos-data", f"{article_id}.pdf")
8687
with open(save_path, "wb") as f:
8788
content = await article.read()
@@ -117,6 +118,7 @@ async def import_self_folder(folder_name: str = Query(...), zip: UploadFile = Fi
117118
result = await crud_import_self_folder(folder_name, article_names, user_id, db)
118119

119120
# 存储文献到云存储
121+
os.makedirs("/lhcos-data", exist_ok=True)
120122
for i in range(0, len(result), 2):
121123
article_id = result[i]
122124
article_name = result[i + 1]

0 commit comments

Comments
 (0)