开发者

Rails uploaded file blank

开发者 https://www.devze.com 2022-12-22 10:26 出处:网络
I\'m trying to upload a file to the server using a HTTP multipart form in rails, and for some reason it\'s turning up blank at the other end. I can see it being received in the rails log thusly:

I'm trying to upload a file to the server using a HTTP multipart form in rails, and for some reason it's turning up blank at the other end. I can see it being received in the rails log thusly:

Processing Admin::HeadlinesController#update (for 127.0.0.1 at 2010-03-08 12:26:13) [PUT]
  Parameters: {"commit"=>"Save changes", "开发者_如何学编程action"=>"update", "_method"=>"put", "authenticity_token"=>"mK70XRk5gOPUwXOcNboT/4K8PD9RBM7GqCOlEUKZwcA=", "headline"=>{"position"=>"1", "location"=>"primary", "attachment_id"=>"13", "headline_content"=>"questionnaires", "article_id"=>"3", "image"=>#<File:/tmp/RackMultipart20100308-63211-1vym9nj-0>}, "id"=>"140", "controller"=>"admin/headlines"}

But if I have a look in /tmp/RackMultipart20100308-63211-1vym9nj-0 the file is blank. Am I right in thinking that this should be the file that I uploaded?

I'm running Phusion Passenger 2.2.7 on Apache 2.2.13, with ruby 1.8.7 and rails 2.3.5, on OSX 10.6.2


OK found the solution to this one, for some reason the browser I am using Google Chromium (build 5.0.341.0 (40245)) isn't sending the files!

0

精彩评论

暂无评论...
验证码 换一张
取 消