-
Notifications
You must be signed in to change notification settings - Fork 0
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
Upload multiple files #34
base: main
Are you sure you want to change the base?
Conversation
…ith an upload multiple one
I decided that if there was an upload multiple files, then it makes no sense to leave a route that just uploads 1 file. This new route replaces the old one, though the parameters have changed. |
fs: Minio = Depends(dependencies.get_fs), | ||
file: UploadFile = File(...), | ||
file_info: Optional[Json[ClowderFile]] = None, | ||
@router.post("/{dataset_id}") |
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.
Any reason you left the response model out?
user_id=Depends(auth_handler.auth_wrapper), | ||
db: MongoClient = Depends(dependencies.get_db), | ||
fs: Minio = Depends(dependencies.get_fs), | ||
files: List[UploadFile] = File(...) |
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.
could file info be just a list of original file_info
instead?
This route allows for the upload of multiple files rather than just one.
For now I added it as a separate route, but there's probably no real reason to have a route for just uploading 1 file. I can remove and replace that route with this one. Please comment on the pull request if that would be better.