pixeltocode
pixeltocode

Reputation: 5288

use uploadify in ruby on rails

i'm trying to use the jQuery Uploadify on a Ruby on Rails project. i am able to browse for a file, and select it. the upload progress goes till 100% and then i get a HTTP error. my development.log is below

Processing ApplicationController#index (for 127.0.0.1 at 2010-02-07 18:33:01) [POST] Parameters: {"Filename"=>"file.psd", "folder"=>"/uploads", "Upload"=>"Submit Query", "Filedata"=>#<File:/var/folders/j5/j5kRE9LqGzqgPWZPtCoi1k+++TI/-Tmp-/RackMultipart20100207-1470-c8y8uc-0>}


ActionController::RoutingError (No route matches "/javascripts/uploadify.php" with {:method=>:post}): Rendering rescues/layout (not_found)

Anyone knows what's wrong here?

Upvotes: 0

Views: 1160

Answers (2)

JRL
JRL

Reputation: 78033

My guess is you probably have the default catchall routes in your routes.rb file:

map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'

Remove those lines and it should work.

See this excellent guide for all you need to know about Rails Routes.

Upvotes: 0

Eimantas
Eimantas

Reputation: 49354

I believe your form action is very wrong - you're using Ruby On Rails, but action submits form to php file.

Upvotes: 3

Related Questions