# File\_fied\_tag on safari

**URL:** <https://www.ruby-forum.com/t/file-fied-tag-on-safari/131906>\
**Category:** Rails\
**Created:** [March 14, 2008, 8:36am UTC](https://www.ruby-forum.com/t/file-fied-tag-on-safari/131906 "2008-03-14T08:36:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![arpit\_jain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d6d6ee/32.png) [@arpit\_jain](https://www.ruby-forum.com/u/arpit_jain)\
**Post date:** [March 14, 2008, 8:36am UTC](https://www.ruby-forum.com/t/file-fied-tag-on-safari/131906/1 "2008-03-14T08:36:46Z")

</div>

Hi  
I am using file\_field\_tag helper to upload the files.  
It is working fine on mozilla and ie but it really screwed me up in  
safari.  
When i see the log file, i found that its binary data is being  
passed,  
not the file hash.So an application error is thrown.  
Had anybody faced this issue before??

Thanks  
Arpit

---

<div class="post-metadata">

**Author:** ![arpit\_jain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d6d6ee/32.png) [@arpit\_jain](https://www.ruby-forum.com/u/arpit_jain)\
**Post date:** [April 15, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/file-fied-tag-on-safari/131906/2 "2008-04-15T20:48:32Z")

</div>

arpit jain wrote:

> Hi  
> I am using file\_field\_tag helper to upload the files.  
> It is working fine on mozilla and ie but it really screwed me up in  
> safari.  
> When i see the log file, i found that its binary data is being  
> passed,  
> not the file hash.So an application error is thrown.  
> Had anybody faced this issue before??
> 
> Thanks  
> Arpit

I have no idea what Safari is doing but I just spent the better part of  
a day chasing it down when I realized Safari was causing a string to be  
delivered to the controller rather than a StringIO. Clear case of why I  
don’t get all the gushing over Safari. It’s a giant piece of [your word  
here]

---

<div class="post-metadata">

**Author:** ![arpit\_jain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d6d6ee/32.png) [@arpit\_jain](https://www.ruby-forum.com/u/arpit_jain)\
**Post date:** [April 15, 2008, 9:16pm UTC](https://www.ruby-forum.com/t/file-fied-tag-on-safari/131906/3 "2008-04-15T21:16:30Z")

</div>

On 15 Apr 2008, at 19:48, Bill Snapper wrote:

> > 
> 
> word  
> here]

Actually it’s rails that decides to do that, based on the size of the  
file.

Fred

---

<div class="post-metadata">

**Author:** ![arpit\_jain](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/d6d6ee/32.png) [@arpit\_jain](https://www.ruby-forum.com/u/arpit_jain)\
**Post date:** [April 15, 2008, 9:24pm UTC](https://www.ruby-forum.com/t/file-fied-tag-on-safari/131906/4 "2008-04-15T21:24:50Z")

</div>

Frederick C. wrote:

> On 15 Apr 2008, at 19:48, Bill Snapper wrote:
> 
> > > 
> > 
> > word  
> > here]
> 
> Actually it’s rails that decides to do that, based on the size of the  
> file.
> 
> Fred

Wouldn’t the file be the same size regardless of the browser? If  
there’s an API defined to return a particular type of object wouldn’t it  
be nice if that were consistent?

I’m told that attachment\_fu is the way to get around this and if that  
works, great. My point is that rails should be more consistent and less  
clever when it comes to basic functionality.
