diff options
author | Loïc Hoguin <[email protected]> | 2016-06-16 22:17:14 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-06-16 22:17:14 +0200 |
commit | 57901a71160e2592d999efb564bef4a50876d6b1 (patch) | |
tree | 0c7debee50980664f35d139504b66f9fb33e83f1 /examples | |
parent | 44f16f3b1e431b1b270d75b082bff3657c1e7788 (diff) | |
download | cowboy-57901a71160e2592d999efb564bef4a50876d6b1.tar.gz cowboy-57901a71160e2592d999efb564bef4a50876d6b1.tar.bz2 cowboy-57901a71160e2592d999efb564bef4a50876d6b1.zip |
Fix upload example
Diffstat (limited to 'examples')
-rw-r--r-- | examples/upload/src/upload_app.erl | 8 |
1 files changed, 4 insertions, 4 deletions
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) -> |