From 57901a71160e2592d999efb564bef4a50876d6b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 16 Jun 2016 22:17:14 +0200 Subject: Fix upload example --- examples/upload/src/upload_app.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/upload/src/upload_app.erl b/examples/upload/src/upload_app.erl index 5285c0f..468d15d 100644 --- a/examples/upload/src/upload_app.erl +++ b/examples/upload/src/upload_app.erl @@ -13,12 +13,12 @@ start(_Type, _Args) -> Dispatch = cowboy_router:compile([ {'_', [ {"/", cowboy_static, {priv_file, upload, "index.html"}}, - {"/upload", upload_handler, []}, - {"/files/[...]", cowboy_static, {priv_dir, upload, "files"}} + {"/upload", upload_handler, []} ]} ]), - {ok, _} = cowboy:start_http(http, 100, [{port, 8080}], - [{env, [{dispatch, Dispatch}]}]), + {ok, _} = cowboy:start_clear(http, 100, [{port, 8080}], #{ + env => #{dispatch => Dispatch} + }), upload_sup:start_link(). stop(_State) -> -- cgit v1.2.3