# Download code for application

**URL:** <https://www.ruby-forum.com/t/download-code-for-application/138235>\
**Category:** IronRuby\
**Created:** [May 21, 2008, 8:40am UTC](https://www.ruby-forum.com/t/download-code-for-application/138235 "2008-05-21T08:40:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sunfish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Post date:** [May 21, 2008, 8:40am UTC](https://www.ruby-forum.com/t/download-code-for-application/138235/1 "2008-05-21T08:40:24Z")

</div>

Hi,  
i want a such code which helps me download a csv file to each client  
machine when he click on download link, for this i am tried lots thing  
but it working for IE, but not for mac, Mozilla, safari.  
i want a optimum solution which works for all situation when i click on  
link, it give me pop up saying where to download file. i need help that  
what changes i do in controller on rhtml.  
please reply.

---

<div class="post-metadata">

**Author:** ![sunfish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Post date:** [May 21, 2008, 9:39am UTC](https://www.ruby-forum.com/t/download-code-for-application/138235/2 "2008-05-21T09:39:24Z")

</div>

This is the wrong list to ask that question but in your controller  
action  
that responds to the link you have to call send file and probably the  
mimetype

def get\_readme  
send\_file(“files/README.txt”, :filename =\> ‘yo\_readme.txt’)  
end

Try googling that for more options

Cheers  
Ivan
