aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-06-09 16:57:11 +0200
committerLoïc Hoguin <[email protected]>2017-06-09 16:57:11 +0200
commitec00e3d60e985e00c6b425434af5017c634801db (patch)
tree52a94d91613704264935aa424330df71d47120b9 /examples
parent6f7b59886ec17027b16ed4d10737452e17f233d0 (diff)
downloadcowboy-ec00e3d60e985e00c6b425434af5017c634801db.tar.gz
cowboy-ec00e3d60e985e00c6b425434af5017c634801db.tar.bz2
cowboy-ec00e3d60e985e00c6b425434af5017c634801db.zip
Make cowboy_req:read_part return multipart headers as map
Diffstat (limited to 'examples')
-rw-r--r--examples/upload/src/upload_handler.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/upload/src/upload_handler.erl b/examples/upload/src/upload_handler.erl
index 08bca6f..5dbf08f 100644
--- a/examples/upload/src/upload_handler.erl
+++ b/examples/upload/src/upload_handler.erl
@@ -8,7 +8,7 @@
init(Req, Opts) ->
{ok, Headers, Req2} = cowboy_req:read_part(Req),
{ok, Data, Req3} = cowboy_req:read_part_body(Req2),
- {file, <<"inputfile">>, Filename, ContentType, _TE}
+ {file, <<"inputfile">>, Filename, ContentType}
= cow_multipart:form_data(Headers),
io:format("Received file ~p of content-type ~p as follow:~n~p~n~n",
[Filename, ContentType, Data]),