sasori Posted September 7, 2013 Share Posted September 7, 2013 Hi, is there such way/method/strategy to detect if the downloading of a file is finished?..my problem is like this. Scenario: when click the report generator button, a loading wheel icon appears because it takes a while to generate the spreadsheet...and now, when the download has finished and the spreadsheet was saved in the client's machine, the loading wheel icon is still there spinning.. the only way that I think of to remove that spinning wheel is by detecting if the downloading is finished and then hide the spinning wheel ..so how ? Quote Link to comment https://forums.phpfreaks.com/topic/281957-how-to-detect-if-download-has-finished-in-order-to-hide-the-spinning-loading-gif/ Share on other sites More sharing options...
kicken Posted September 7, 2013 Share Posted September 7, 2013 If you run the download via a PHP script, you can have it update a value somewhere to indicate when it has finished sending the file. Note though that this would merely indicate that it sent the file, not that it was successfully received on the end-users machine. As for the issue of just hiding the loading icon, you may need to be a bit more descriptive of how you have things setup. It sounds like you'd need to be constantly polling the server to check the generation/download status the way you describe things right now. Quote Link to comment https://forums.phpfreaks.com/topic/281957-how-to-detect-if-download-has-finished-in-order-to-hide-the-spinning-loading-gif/#findComment-1448621 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.