File gets truncated if the response to Filedownload dialog is dela

G

Guest

Hi,
I am trying to download a zip file sent by our application. It uses apache
webserver and IE for browser.Our application streams the zip file to the
webserver which is then sent to the browser, when the user sends the request
for download. Note that it is not FTP'd.Once download is requested IE pops up
a file download dialog box. If save is clicked immediately the Zip file after
saving opens properly(the downloaded size and actual size is same). But when
save/open is clicked after say 2 minutes the saved zip file is actually
truncated in size and when opened it says "corrupt file" or "invalid input".
Any reasons why it happens like this?

cheers,
ram
 
R

Rob ^_^

Hi Ramp,

Session timeout? or
server-code...

Blah, blah

Response.WriteBinary {your file stream}

Response.flush

If Response.IsClientConnected = true then

' Update a database with the download log
end if
Response.end

This is vbscript code for IIS so you will have to modify it for Apache.

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top