Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package controllers
- import play.api.mvc._
- object Application extends Controller {
- def upload = Action(parse.multipartFormData) {
- request =>
- if (request.body.files.isEmpty) BadRequest("Invalid file!")
- else if (request.body.asFormUrlEncoded.isEmpty) BadRequest("Invalid data!")
- else Ok("Everything is okay!")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement