Http.MultipartFormData.FilePart upload to a different directory

17 views
Skip to first unread message

John Gateley

unread,
Mar 26, 2015, 10:46:47 PM3/26/15
to play-fr...@googlegroups.com
Hello,

I am uploading a file and getting the uploaded file via:
    public static Result saveImage() {
        Http.MultipartFormData body = request().body().asMultipartFormData();
        Http.MultipartFormData.FilePart picture = body.getFile("picture");
        String name = picture.getFilename();
        File tempFile = picture.getFile();
...

The file is placed in a temp directory (/tmp for linux, and a /var/folders temp directory for OS X).

Is it possible to change this? To be able to use different directories?

Thanks

John

Reply all
Reply to author
Forward
0 new messages