[Play 2.4.x java] How to perform file upload monitoring?

129 views
Skip to first unread message

Cyril

unread,
Oct 13, 2015, 9:00:49 AM10/13/15
to play-framework
Hi All,

I need to upload large files (let's say 1-2GB), from a java http client.
What would be the right approach to do that and display some progress info on the http client when a single is uploading?
Is there any existing module doing the job (I don't find any at this point...)

Many thanks in advance.

Cyril

Cyril

unread,
Oct 21, 2015, 8:54:06 AM10/21/15
to play-framework
Any suggestions are most welcome.

Andreas S.

unread,
Oct 21, 2015, 10:41:24 AM10/21/15
to play-framework
I think counting the number of bytes that are already sent to the server is something you have to do with your http client and therefor is not something that Play cares about. 

However if you need to process the file on the server and you want to show the progress of that process then you can use something like long-polling or websockets.

Erol Merdanović

unread,
Oct 21, 2015, 1:58:29 PM10/21/15
to play-framework
Here is the example (in scala) using akka to handle upload progress - https://gist.github.com/jrudolph/08d0d28e1eddcd64dbd0
Reply all
Reply to author
Forward
0 new messages