Skip to content
\n

in a handler such as ...

\n
#[put(\"/\", data = \"<form>\")]\nasync fn put(mut form: Form<OneStatement<'_>>) -> MyResponse {}
\n

fail w/ 415 (Unsupported Media Type) presumably b/c Rocket doesn't recognize the multipart/mixed content-type header and consequently doesn't route the Request to the handler.

\n

q1/ is there already some Rocket feature that makes this possible?

\n

one alternative would be to handle the decoding and partitioning of the incoming data myself w/ the Streaming capability.

\n

q2/ is this the right approach? and if it is...

\n

q3/ --although this is not specifically related to Rocket-- can you recommend any 3rd-party crate(s) that do this and work well w/ Rocket?

\n

thanks in advance + cheers;
\nrsn

","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"

Well, I've taken a stab at it (and released as v0.1.1). Let me know if there are any additional features that might be useful.

","upvoteCount":0,"url":"https://github.com/rwf2/Rocket/discussions/2811#discussioncomment-9848244"}}}

Multipart/mixed content-type support #2811

Discussion options

You must be logged in to vote

Well, I've taken a stab at it (and released as v0.1.1). Let me know if there are any additional features that might be useful.

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@raif-s-naffah
Comment options

@the10thWiz
Comment options

Answer selected by raif-s-naffah
@raif-s-naffah
Comment options

@the10thWiz
Comment options

@raif-s-naffah
Comment options

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