Skip to content
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

fix awaiting for file #88

Merged
merged 1 commit into from
Jan 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,10 @@ async def _get_study():
@bp.route("/upload_file", methods=["POST"])
async def upload_file() -> Tuple[dict, int]:
study = await _get_study()
logger.info(f"upload_file: {study.id}, request: {request}, request.files: {request.files}")
files = await request.files
logger.info(f"upload_file: {study.id}, request: {request}, request.files: {files}")

file = (await request.files).get("file", None)
file = files.get("file", None)
if not file:
raise BadRequest("no file")
logger.info(f"filename: {file.filename}")
Expand Down
Loading