“The compressed (zip) folder is invalid or corrupted” error after downloading zip file – sometimes, but not always

zip

I have a zip archive of ~250Mb located on an Apache HTTP server. Several users have complained of a "corrupt zip folder" after downloading the file directly from the website (albeit the site is built on Drupal but it is using the public download method so it should be a direct download)

The error message when they try to open it in Windows is:

The compressed (zip) folder is invalid or corrupted

I have tried this myself on Windows XP and using both Firefox 14 and IE8. Sometimes it downloads and opens correctly, sometimes I get the error.

Another user is on Windows 7 and using Internet Explorer and has got this message after several download attempts.

When I download via FTP using Filezilla I can open the zip file without errors.

As FTP and HTTP download works at times, then I assume the file on the server is not corrupted but something happens during download and re-uploading the file would not fix anything (and I have tried this).

I created the zip file using IZArc but I am not so sure the method of creation is relevant in this case as it sometimes works.

  1. What causes the above error messages?
  2. Why does it happen some of the time and not all of the time?
  3. What could I do to ensure zip files open without any errors in future?

Best Answer

What causes the above error messages?

The download is probably corrupted or truncated (incomplete). Check if the downloaded filesize is same as the size on the server.

Why does it happen some of the time and not all of the time?

The download could be truncated due to the connection being dropped, which is something random - it might happen and might not happen. If your connection quality is better, it'll probably be less likely to occur.

What could I do to ensure zip files open without any errors in future?

Provide checksums for all your downloads, and get your users to verify them. You can't really avoid network issues, however. You may wish to speak to your host.

Related Question