I have the following object
object Upload_Dispatch extends RestHelper {
serve {
/* Presentation ---------------------------------------------*/
case "upload_presentation" :: Nil Post req => {
println(req.body.map(_.length))
JsonResponse(JObject(JField("success", JBool(true)) :: Nil))
}
}
}
This comes from here:
https://github.com/timperrett/lift-file-uploader
The valums uploader script is here:
http://valums.com/ajax-upload/
I’ve got the whole thing working ok with the response returned etc, how do I actually save the files that are being sent? How do I access the actual byte array so I can use FileOutputStream?
Thanks in advance, any help much appreciated 🙂
I think you can adjust the code form here to get your file upload save the files to your server.
That example saves it to MongoFS.
This one saves it to the disk