-
Notifications
You must be signed in to change notification settings - Fork 0
Test/api test #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test/api test #49
Changes from all commits
67b6eca
d719fcd
b8625bb
c7e2f0f
0a8f6e6
bf975ad
9ac4b75
c930c77
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,6 +101,7 @@ backend/app/media/* | |
| # LLM提供的问题解决方案 | ||
| solutions/ | ||
| tmp/ | ||
| htmlcov #测试报告 | ||
| .claude/ | ||
| openai.json | ||
| scripts/dev.sh | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,3 +17,4 @@ | |
|
|
||
| api_router.include_router(library.router, prefix="/library", tags=["library"]) | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -173,6 +173,8 @@ async def upload_paper( | |
|
|
||
| original_display_name = normalize_original_filename(file.filename) | ||
| storage_candidate = sanitize_storage_filename(original_display_name) | ||
| # Ensure the upload directory exists even if MEDIA_ROOT is cleaned between tests. | ||
| UPLOAD_DIR.mkdir(parents=True, exist_ok=True) | ||
|
Comment on lines
+176
to
+177
|
||
| stored_filename, destination = ensure_unique_storage_name(UPLOAD_DIR, storage_candidate) | ||
|
|
||
| await asyncio.to_thread(destination.write_bytes, cleaned_bytes) | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace should be removed from this line to maintain code cleanliness and adhere to standard formatting practices.