When downloading a file to a client, how can I inform the client of the file size, so it can predict how long it will take?
Created May 7, 2012
Donatello Parigino You must set the Content-length HTTP header.
You can use the following code:
response.setHeader("Content-disposition", "attachment;filename=name"); response.setIntHeader("Content-length", filelength); ServletOutputStream sos = response.getOutputStream(); ...