Detect file download status

Hello you Railers,
I need to check the status of a file’s download (if it completed
succesfully or not). Imagine something like a shop. You login, you pay,
you download. And if the file is downloaded successfully I want to stop
providing the link to the user, so he/she cant download it any longer.

Topic Secret URLs and file downloads - Rails - Ruby-Forum focuses on a similar issue.
There, mod_secdownload for Lighttpd, and mod_auth_token for Apache is
suggested to do a job that might do (provide expiring urls). Does
anybody know if this functionality can be taken care inside of rails?
Something like detecting the status of a send_file call?

many many thanks!

Let’s say a file finished downloading, do you want to make sure that it
is not corrupt? If you do, I don’t think you can do that with any
server side method.

Actually I didnt thought about that yet (the corruption thing).I guess I
should. For the start I want to make sure that the download completed
(i.e. it wasnt interrupted).