jFileDownload: read file from server stream

Files and folders downloader add-on with resume support.
Post Reply
techvalue
Posts: 1
Joined: Wed Jan 26, 2011 12:32 pm

jFileDownload: read file from server stream

Post by techvalue »

Hello,
Our application is not currently using java code (i.e. applet) client side (i.e. into browser).
Our download session begin with a servlet get method that send file through streaming to client browser.
Client side code :
<FORM ACTION="download" METHOD=GET>
<INPUT TYPE=HIDDEN NAME="download" VALUE="<%= Filename_to_download%>">
<INPUT TYPE="SUBMIT" VALUE="Download" title="Download this file !">
</FORM>
Server-Side "download" Servlet
...
ServletOutputStream out = response.getOutputStream();

response.setHeader("Content-Type", "application/octect-stream");
response.addHeader("Content-Disposition", "attachment; filename=" + filename);
response.addHeader("Content-length", isize);

ServletUtils.returnFile(FullFilePath, out);
...
Using your code are we able to use a streaming flow ?
Can we use download resume starting from a streaming flow ?

When we have an broken download and we close browser (i.e. InternetExplorer 7 our standard browser) are we able to begin a new browser download session and have the resume of previous broken download ?

Thanks in advance.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: jFileDownload: read file from server stream

Post by support »

Yes, I think you can use JFileDownload but for resume you need to support "Range" header. Does your servlet support it?

Post Reply