downloader.js icon indicating copy to clipboard operation
downloader.js copied to clipboard

Timeout issue

Open usherfiles opened this issue 6 years ago • 1 comments

Hi man, it's a really amazing script, thanks for giving it for free :) I would like to ask you 2 questions about implementation of this script, and sorry for my shitt* english, I'm from argentina :) NOTE: I don't use this script to download "chunks", I just use it as a "blob downloader" for full files (1 chunk) First of all, your script works like a charm, but I have an issue with my host, i'm on a shared host where the php execution limit time is 120 seconds, so I can't download large files thru php because of that, maybe your script can be implemented like this : the script downloads for 100 seconds and stops the transfer to ask for the php again (only to restart the "running" time) and starting from the point where it stopped and resuming the total download again and again until it reach the end of the file. So the "chunks" are variable and the total download goes in a "serial" fashion (not paralell as is now) Also i'm getting a "error content length missmatch" (or something like that even in direct downloads without php) and the script stops and show message that the file has been downloaded and it's ready, when it's not ready and the download failed.. is there a way to check if the download failed for X reason and resume the download without refreshing the website? because sometimes the browser doesn't save it on cache... I hope this "issue" thread doesn't make you angry or something haha. I just wanted to make you personally those questions. Thanks in advance man <3 cheers

usherfiles avatar Jan 10 '18 08:01 usherfiles

Thank you, not at all, not the best language skill here also so don't worry :) Well this is not an active project right now and like to base the script on different browser features in future but I like to help you :) can't investigate this deeply but such scenario better to use stop/start functionality doesn't exist on XHR but on fetch streaming AFAIK. Serial chunk downloading is also a good idea, it just needs some management on retrying each. I guess you should try http://php.net/manual/fa/function.http-send-file.php and "error content length missmatch" is a severe issue it can be a bug from my script on from somewhere else. I hope with http_send_file you even don't need to use this script even as I guess that removes web server timeouts, I hope that would work with your shared host configuration however.

ebraminio avatar Jan 10 '18 08:01 ebraminio