Image upload in rails not working

i need to upload one image and send that into one api,here not using the database.i have used this file upload without activerecord activerecord but not working. it gives the error with orginal_filename? this is what i am getting when i use this

file_param = params[:name]
file_name = file_param.original_filename  
NoMethodError (undefined method `original_filename' for "C:\\fakepath\\logo-big.png":String):


Isn't it a good idea to use gem carrierwave. Here is an awesome tutorial. Check it out.


if your view something like this: <%= file_field_tag 'upload[file]' %>

change your controller code to this:

file_name = params[:upload][:file].original_filename

Need Your Help

Wait After While Loop


I have a while loop thats going too fast so I want to make it happen every second or so. I have this right now:

Standard way to open a folder window in linux?

python linux cross-platform desktop

I want to open a folder window, in the appropriate file manager, from within a cross-platform (windows/mac/linux) Python application.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.