-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
How to get multi-part form file from the http request? #28
Comments
You means splitting query of URI? Like http://.../?a=1&b=2c=3... |
@Barenboim , URI Like http://.../?a=1&b=2c=3 is usually the query parameter in URL for GET method. What I mean is the file attachment in the http request. You can think about the scenario which an image file was sent to the server, and the server need to save the file. |
Sorry, we don't parse multi-part form of http message automatically. So you may get the message body, and parse it by yourself. |
To decode chunked body, you may use HttpUtil::decode_chunked_body in HttpUtil. Or use HttpChunkCursor to decode chunks with zero-copy. |
@tjliupeng |
Nice. |
int state = task->get_state();
I use the snap code above to the http Post response, response data is to much, but the maxmium len is always 380696, I use the tool Postman it return the all data, how can I get the rest data or there is a bug on the reponse data buffer . |
Hi, guys,
I want to use the workflow to build a RESTful server which can receiver image file from client and do some AI works. As the title says, how to get multi-part form file from the http request? Can you share a code example?
Thanks!
The text was updated successfully, but these errors were encountered: