marshmallow-code / marshmallow-code/flask-smorest

Multiple File upload thought form-data

Open
#474 4 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
Python
Stars
717
Forks
77
Avg merge
7h 49m
Merged PRs (30d)
3

Description

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?

I am trying to upload multiple zip archives serializing request with `flask_smorest.fields.Upload`, in resources im use blueprint arguments with `@blp.arguments(UploadShema, location="files")` and getting file with `f = files["data"]`. But the issue is `f` returns only first file added thought form-data.

How could this issue be resolved?

Contributor guide

Open the contributing guide

Research direction

The issue names flask_smorest.fields.Upload and @blp.arguments(..., location="files"), with files["data"] as the observed entry point. Start by tracing how repeated form-data file parts are parsed there; done means the behavior for multiple ZIP archives is defined and can be verified from that entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
flask, python
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.