# Detect file download status

**URL:** <https://www.ruby-forum.com/t/detect-file-download-status/68062>\
**Category:** Rails\
**Created:** [September 8, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/detect-file-download-status/68062 "2006-09-08T20:35:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kleas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/47e85d/32.png) [@kleas](https://www.ruby-forum.com/u/kleas)\
**Post date:** [September 8, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/detect-file-download-status/68062/1 "2006-09-08T20:35:34Z")

</div>

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](http://www.ruby-forum.com/topic/58677) 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!

---

<div class="post-metadata">

**Author:** ![kleas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/47e85d/32.png) [@kleas](https://www.ruby-forum.com/u/kleas)\
**Post date:** [September 8, 2006, 11:31pm UTC](https://www.ruby-forum.com/t/detect-file-download-status/68062/2 "2006-09-08T23:31:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![kleas](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/47e85d/32.png) [@kleas](https://www.ruby-forum.com/u/kleas)\
**Post date:** [September 9, 2006, 10:49am UTC](https://www.ruby-forum.com/t/detect-file-download-status/68062/3 "2006-09-09T10:49:19Z")

</div>

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).
