aboutsummaryrefslogtreecommitdiffstats
path: root/examples/upload/src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/upload/src')
-rw-r--r--examples/upload/src/upload_handler.erl6
1 files changed, 1 insertions, 5 deletions
diff --git a/examples/upload/src/upload_handler.erl b/examples/upload/src/upload_handler.erl
index 63cda96..dec634d 100644
--- a/examples/upload/src/upload_handler.erl
+++ b/examples/upload/src/upload_handler.erl
@@ -4,16 +4,12 @@
-module(upload_handler).
-export([init/2]).
--export([handle/2]).
init(Req, Opts) ->
- {http, Req, Opts}.
-
-handle(Req, State) ->
{ok, Headers, Req2} = cowboy_req:part(Req),
{ok, Data, Req3} = cowboy_req:part_body(Req2),
{file, <<"inputfile">>, Filename, ContentType, _TE}
= cow_multipart:form_data(Headers),
io:format("Received file ~p of content-type ~p as follow:~n~p~n~n",
[Filename, ContentType, Data]),
- {ok, Req3, State}.
+ {ok, Req3, Opts}.