yeah, Koz just helped me out. It is rake and appears to be fixed in later
versions, although we can't upgrade.

What it's doing is this:

if content_type || filename

  body = Tempfile.new("RackMultipart")

  body.binmode  if body.respond_to?(:binmode)

end

passing the content type for non-file fields is actually valid, so using
that as a 'is it a file' test is wrong and currently biting us.

--nahum


On Fri, Sep 2, 2011 at 10:00, Y. Thong Kuah <[email protected]> wrote:

> The problem is probably in Rack, so Rails 2.3.x could be Rack 1.1 or Rack
> 1.0
>
>
> On Fri, Sep 2, 2011 at 8:55 AM, nahum <[email protected]> wrote:
>
>> We have a rather perplexing problem. When a client is posting a file to
>> our API each field is coming through as a file, so 'name', 'description',
>> 'quantity' etc are all being stored as files on disk with the correct data
>> in the file.
>>
>> I don't believe it's a rails problem as the client is using Cold Fusion (I
>> know!!) and can successfully send the same data as a curl call. Before I go
>> and spend a bunch of time trying to fix it I was wondering if anyone here
>> had hit upon this??  Presumably the request is being badly formatted, I've
>> just got to figure out how.
>>
>> For what it's worth, we're on rails 2.3.x and have more gems than god.
>>
>> cheers,
>> nahum
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "WellRailed" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/wellrailed/-/ckyPEoJSwO0J.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/wellrailed?hl=en.
>>
>
>
>
> --
> Best regards,
> Y. Thong Kuah
> http://kuahyeow.com
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "WellRailed" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/wellrailed?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"WellRailed" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/wellrailed?hl=en.

Reply via email to