Guest User

Untitled

a guest
May 25th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. dispatch_requests(Req) ->
  2. Path = Req:get(path),
  3. Action = clean_path(Path),
  4. Method = Req:get(method),
  5. handle(Action, Req, Method).
  6.  
  7. handle("/upload", Req, "GET") ->
  8. Req:serve_file("upload_form.html", ?ROOT_DIR, [sessions:cookie(Req)]);
  9.  
  10. handle("/upload", Req, "POST") ->
  11. matchmaker:upload_ready(sessions:key(Req), self()),
  12. upload(Req);
Add Comment
Please, Sign In to add comment