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

Upload multiple files #34

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Upload multiple files #34

wants to merge 3 commits into from

Conversation

tcnichol
Copy link
Collaborator

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.

@tcnichol tcnichol requested a review from max-zilla December 16, 2021 19:39
@tcnichol tcnichol linked an issue Dec 16, 2021 that may be closed by this pull request
@tcnichol
Copy link
Collaborator Author

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}")
Copy link
Member

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(...)
Copy link
Member

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?

@CLAassistant
Copy link

CLAassistant commented Feb 15, 2022

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

allow upload of multiple files
3 participants