play-ws icon indicating copy to clipboard operation
play-ws copied to clipboard

there is no doc for file upload

Open TopSpoofer opened this issue 8 years ago • 3 comments

the file upload at play's doc was don't working!

TopSpoofer avatar May 24 '17 08:05 TopSpoofer

@TopSpoofer Can you describe how it "doesn't work?"

https://www.playframework.com/documentation/2.5.x/ScalaWS#Submitting-multipart/form-data

wsargent avatar Jun 04 '17 13:06 wsargent

@wsargent it's said that there no doc for the file name's charset. I send a file part with a chinese file name and get a file name with messy code in an ohter play server.

djx314 avatar Aug 12 '17 19:08 djx314

Just like httpclient's code

MultipartEntityBuilder.create.setMode(HttpMultipartMode.BROWSER_COMPATIBLE)

to avoid the utf-8 file name to post with messy code. But in play-ws I can just write

FilePart("video_0", videoPath.getFileName.toString, Option("text/plain;charset=utf-8"), FileIO.fromPath(videoPath))

And the file name is wrong with messy code.

djx314 avatar Aug 14 '17 11:08 djx314