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

Multi-File Upload? #321

Closed
Anti-Distinctlyminty opened this issue Jan 24, 2022 · 4 comments
Closed

Multi-File Upload? #321

Anti-Distinctlyminty opened this issue Jan 24, 2022 · 4 comments
Labels

Comments

@Anti-Distinctlyminty
Copy link

I'm currently using flask_smorest.fields.Upload to handle file uploads, but this only allows selecting a single file. Is it possible to upload many files?

@lafrech
Copy link
Member

lafrech commented Jan 24, 2022

You can have multiple Upload fields in the argument schema.

See related discussion: #46.

@Anti-Distinctlyminty
Copy link
Author

This is probably impractical for my purposes as I'm dealing with image sequences which can be thousands of files. Perhaps a zip archive is more practical.

@kettenbach-it
Copy link

Can I have a list of Uploads, too?

flask_smorest.fields.List(flask_smorest.fields.Upload)

@kettenbach-it
Copy link

I think I meant this:

@MyBlp.arguments(MultipartSchema(many=True), location="files")

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

No branches or pull requests

3 participants