Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. package controllers
  2.  
  3. import play.api.mvc._
  4.  
  5. object Application extends Controller {
  6. def upload = Action(parse.multipartFormData) {
  7. request =>
  8. if (request.body.files.isEmpty) BadRequest("Invalid file!")
  9. else if (request.body.asFormUrlEncoded.isEmpty) BadRequest("Invalid data!")
  10. else Ok("Everything is okay!")
  11. }
  12.  
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement