# Image Downloads in IE

**URL:** <https://www.ruby-forum.com/t/image-downloads-in-ie/84770>\
**Category:** Rails\
**Created:** [February 7, 2007, 4:25pm UTC](https://www.ruby-forum.com/t/image-downloads-in-ie/84770 "2007-02-07T16:25:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![laurin1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@laurin1](https://www.ruby-forum.com/u/laurin1)\
**Post date:** [February 7, 2007, 4:25pm UTC](https://www.ruby-forum.com/t/image-downloads-in-ie/84770/1 "2007-02-07T16:25:56Z")

</div>

Hi,

This may not be a rails issue, if not apologies.

I have an application which allows image downloads.

The image is downloaded with the code:  
send\_data(@wallpaper.image,  
:filename =\> @wallpaper.path,  
:type =\> @wallpaper.image\_content\_type,  
:disposition =\> “downloaded”)

However, Internet Explorer doesn’t download the image, it just displays  
it.  
I know can do the  
whole ‘Right click and choose save as’ thing but I was wondering is  
there a  
method of  
avoiding this with rails.

Thanks in advance,

Keith

---

<div class="post-metadata">

**Author:** ![laurin1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@laurin1](https://www.ruby-forum.com/u/laurin1)\
**Post date:** [February 7, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/image-downloads-in-ie/84770/2 "2007-02-07T17:21:01Z")

</div>

On 2/7/07, Keith D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ```
> :disposition => "downloaded")
> 
> ```
> 
> However, Internet Explorer doesn’t download the image, it just displays it.  
> I know can do the  
> whole ‘Right click and choose save as’ thing but I was wondering is there a  
> method of  
> avoiding this with rails.
> 
> Thanks in advance,
> 
> Keith

Keith,

Try it without setting the :disposition (which doesn’t appear to be a  
valid value).

send\_data(@wallpaper.image,  
:filename =\> @ wallpaper.path,  
:type =\> @wallpaper.image\_content\_type)

–  
Zack C.  
[http://depixelate.com](http://depixelate.com)

---

<div class="post-metadata">

**Author:** ![laurin1](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/919ad9/32.png) [@laurin1](https://www.ruby-forum.com/u/laurin1)\
**Post date:** [February 7, 2007, 5:36pm UTC](https://www.ruby-forum.com/t/image-downloads-in-ie/84770/3 "2007-02-07T17:36:04Z")

</div>

Thanks Zack,

Its working perfectly now.

Not sure I picked up that :disposition value but it must have been in an  
example  
somewhere.

Keith
