# How to download a file uploaded through attachment\_fu?

**URL:** <https://www.ruby-forum.com/t/how-to-download-a-file-uploaded-through-attachment-fu/143906>\
**Category:** Rails\
**Created:** [July 23, 2008, 6:36pm UTC](https://www.ruby-forum.com/t/how-to-download-a-file-uploaded-through-attachment-fu/143906 "2008-07-23T18:36:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahulonrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rahulonrails](https://www.ruby-forum.com/u/rahulonrails)\
**Post date:** [July 23, 2008, 6:36pm UTC](https://www.ruby-forum.com/t/how-to-download-a-file-uploaded-through-attachment-fu/143906/1 "2008-07-23T18:36:36Z")

</div>

Hi,

I’m new to rails world. I tried out simple example using attachment\_fu.

I have successfully uploaded a file and also can delete the file just by  
giving the id.

I need help in downloading the file saved in the file system.

send\_file(File.join(FILE\_PATH, file\_name), :filename =\> @video.filename,  
:disposition =\> ‘attachment’)

This doesn’t works since attachment\_fu follows some procedure in saving  
the files like

0000  
|\_00  
|\_file1.txt  
|\_01  
|\_file2.txt

Thanks,

---

<div class="post-metadata">

**Author:** ![rahulonrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ad7895/32.png) [@rahulonrails](https://www.ruby-forum.com/u/rahulonrails)\
**Post date:** [July 28, 2008, 8:28am UTC](https://www.ruby-forum.com/t/how-to-download-a-file-uploaded-through-attachment-fu/143906/2 "2008-07-28T08:28:20Z")

</div>

There are “full\_filename” and “public\_filename” methods in  
‘file\_system\_backend.rb’ in attachment\_fu. Using these methods you can  
get the full path of the file. You just have to call these methods for  
your model object.

Ex:

my\_obj.full\_filename # Returns the full path of the file
