Converting FileUploadController to Scala (and adding authentication).