Download suddenly stopped

Hello there,

My website is a website that create a zip file and then the user can download it.

I am here to ask a question: why is when a file that take more than about 7 seconds to download, and try to download it, the download will stuck, for example: it will say 15 seconds left with 1.4Mbps but it wont download the rest, the zip system uses the php-zip ( GitHub - Ne-Lexa/php-zip: PhpZip is a php-library for extended work with ZIP-archives. ) that i set up manually, and for downloading the zip, i use the outputAsAttachment function.

Thank you for your attention.

I’m not sure if you understands Mbps correctly since Mbps and MB/s (uppercase and lowercase B) are two different things.

Since you mentioned browser download I’m going to assume MB/s.

Free hosting doesn’t allow any files over 10 MB in size.
7 * 1.4 = 9.8 which is very close to 10, so that might explain why everything that takes more than 7s will fail.

7 Likes

Thank you for your correction (about the Mbps and MB/s) and your answer,

So if free hosting does not allow files over 10 MB in size (for download), is there any workarounds?

The only possible workaround is to upload a file to somewhere like Google Drive and ask visitors to download the file from there instead.

But since you are generating the archive on the fly, I’m afraid that there’re no workarounds.

Of course you could upgrade to premium but, well, only if you really need this function badly, and have spare money.

6 Likes

Okay, Thank you :smiley:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.