Skip to content

Upload zip or tar.gz file in POST #3250

Answered by Alc-Alc
guzman109 asked this question in Q&A
Discussion options

You must be logged in to vote

media_type is used to serialize whatever you return from the handler upload. Litestar does not know how to serialize dict[str, Any] into a tar file which is why it fails.

media_type is not used to indicate that your route accepts tar gz files.

You can remove media_type and you will notice that you can indeed upload a file and get a json response

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@guzman109
Comment options

Answer selected by guzman109
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants