# Problem with send\_file and Exlporer 7

**URL:** <https://www.ruby-forum.com/t/problem-with-send-file-and-exlporer-7/86980>\
**Category:** Rails\
**Created:** [February 27, 2007, 10:11am UTC](https://www.ruby-forum.com/t/problem-with-send-file-and-exlporer-7/86980 "2007-02-27T10:11:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fred\_o](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e99b99/32.png) [@fred\_o](https://www.ruby-forum.com/u/fred_o)\
**Post date:** [February 27, 2007, 10:11am UTC](https://www.ruby-forum.com/t/problem-with-send-file-and-exlporer-7/86980/1 "2007-02-27T10:11:00Z")

</div>

Hi all,

I am new to RoR and ruby.  
In one of my controller I have:

def attachment  
send\_file(‘polop.txt’,  
:filename =\> ‘polop.txt’,  
:disposition =\> ‘attachment’,  
:streaming =\> ‘true’)  
end

With Firefox, when the fonction is called the file can be downloaded and  
the dialog box contains the right information… but with Internet  
Explorer 7 the dialog box doesn’t have the right file name (it has the  
name of the fuction that calls ‘attachment’) and doesn’t recognize the  
format of the file.

I can’t find why I got this difference of behaviors. I hope you can  
help.

Thanx

Fred

---

<div class="post-metadata">

**Author:** ![fred\_o](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/e99b99/32.png) [@fred\_o](https://www.ruby-forum.com/u/fred_o)\
**Post date:** [March 6, 2007, 9:20am UTC](https://www.ruby-forum.com/t/problem-with-send-file-and-exlporer-7/86980/2 "2007-03-06T09:20:10Z")

</div>

I found that by removing ‘redirect\_to’ from the function that was  
calling ‘attachment’ I was able to download my file with IE 7…
