I am using a restclient for a multi-page form to send data to a soothing web service (this is Panda's video encoding service). The trick is that the file I submit to the restclient (Technoweenie branch) comes from my own form that the user submits.
So let's get through this. A user uploads a file to my rails application. In my controller, it gets the file from params [: file]. Then I want to pass params [: file] to Panda using RestClient.
The error I get is on the Panda server. I noticed that the file parameter in the stack trace is also on the line (I assume Panda turns into a line for a more convenient stacktrace).
~ Started request handling: Wed Aug 12 18:05:15 +0000 2009 ~ Params: {"format"=>"html", "multipart"=>"true", "account_key"=>"SECURE_KEY", "action"=>"upload", "id"=>"SECURE_ID", "controller"=>"videos", "file"=>"#<File:0xcf02ca4>"} ~ 9bfb1750-6998-012c-4509-12313900b0f6: (500 returned to client) InternalServerErrorcan't convert nil into String /var/local/www/panda/app/models/video.rb:246:in `extname' /var/local/www/panda/app/models/video.rb:246:in `initial_processing' /var/local/www/panda/app/controllers/videos.rb:79:in `upload'
ruby ruby-on-rails rest-client
Dan trade
source share