Jump to content

How to know whether a file has been downloaded successfully on the client side?


Recommended Posts

Hello beautiful people, is it possible to know whethere a file has been downloaded successfully by the user? Does it have something to do with flush()? I guess it's possible with Ajax, but I don't have a clue which are the php functions to be used. Thanking you in advance.

 

astro

It isn't possible not even with Ajax

Ajax makes requests to server side scripts (ajax is javascript, not a language in itself). A server script has nothing to do with the download process. This is done via the users operating system. Aslo javascript will not help as it is parsed by a web browser. I have never heard of websites that perform actions after a download has completed (as it's impossible).

Actually i believe it is possible, and it requires 2 things.

1) You detect a call to premature halt of your script

2) You detect byte count of delivered files.

 

I messed around with something along these lines quite a while ago, but don't recall if i ever got it working.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.