Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- dispatch_requests(Req) ->
- Path = Req:get(path),
- Action = clean_path(Path),
- Method = Req:get(method),
- handle(Action, Req, Method).
- handle("/upload", Req, "GET") ->
- Req:serve_file("upload_form.html", ?ROOT_DIR, [sessions:cookie(Req)]);
- handle("/upload", Req, "POST") ->
- matchmaker:upload_ready(sessions:key(Req), self()),
- upload(Req);
Add Comment
Please, Sign In to add comment