views:

362

answers:

2

hi...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? thanx

+1  A: 

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

Eimantas
i know something is wrong. my question was...'what is wrong?'. i've used Uploadify in a non-rails environment and it worked.
pixeltocode
Well maybe try changing the submit action? Here, I googled that for you: http://railstips.org/blog/archives/2009/07/21/uploadify-and-rails23/
Eimantas
A: 

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.

JRL
thanx but i don't have the catchall routes in my routes.rb
pixeltocode