Skip to content

Upload fails with multipart/form-data #150

Open
@romado77

Description

@romado77

Long story short

Upload with multipart/form-data fails when schema validation is enabled. Exception "ValueError: Could not find starting boundary b'--somestuff' thrown when trying to access multipart info.

Steps to reproduce

curl --location --request POST 'http://localhost:8080/api/v1/'
--form 'someinfo="sdjkhflksjhdflkjhlkjh"'
--form 'file=@"./test.zip"'

Result: exception, no data in StreamReader

  • Run client without validation:

curl --location --request POST 'http://localhost:8080/api/v2/'
--form 'someinfo="sdjkhflksjhdflkjhlkjh"'
--form 'file=@"./test.zip"'

Result: file upload is ok

Environment

Python - 3.8.5
aiohttp - 3.7.3
rororo - 2.2.0

Metadata

Metadata

Labels

bugSomething isn’t workingopenapiIssue or pull request related to OpenAPI code

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions