1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 01:51:23 +02:00

update actix; update examples

This commit is contained in:
Nikolay Kim
2017-10-21 15:21:16 -07:00
parent 0865071dd7
commit 4560ca17b2
10 changed files with 112 additions and 109 deletions

View File

@ -18,8 +18,13 @@ impl Route for MyRoute {
fn request(req: HttpRequest, payload: Payload, ctx: &mut HttpContext<Self>) -> Reply<Self> {
println!("{:?}", req);
let multipart = match req.multipart(payload) {
Ok(mp) => mp,
Err(e) => return Reply::reply(e),
};
// get Multipart stream
WrapStream::<MyRoute>::actstream(req.multipart(payload)?)
WrapStream::<MyRoute>::actstream(multipart)
.and_then(|item, act, ctx| {
// Multipart stream is a stream of Fields and nested Multiparts
match item {