Discussion Forums
- Topic List
- Most Recent Posts
- Sign In for more options
Hello experts, I need to upload an image from my local computer to a web server and store the location in a database using attachment_fu plugin I am trying to use attachement_fu plugin on sinatra..
When I'm posting request on sinatra.. including file params
then in log it showing posted params[:file] format in hash type.. like
{"uploaded_data"=> {:filename=>"user.JPG", :type=>"image/jpeg", :name=>"custom_thumbnail[uploaded_data]", :tempfile=>
#,
:head=>
"Content-Disposition: form-data;
name=\"custom_thumbnail[uploaded_data]\"; filename=\"user.JPG\"\r\nContent-Type: image/jpeg\r\n"}}
instead of as attachement_fu needs it request file params as like
{"uploaded_data"=> #>}
Due to above(first one) has type format attachement_fu is not supporting..
it showing errors like
undefined method 'content_type' and all other....
Any ideas..? on how to get this to change/access params format as normal format(like action_controller params)?
*NOTE- its working fine when I'm posting that request on any controller but not working in sinatra..
Thank you in advance
-Ganesh K
