ruby on rails: Uploading image in mysql
I am doing a project which allows user to upload image.
My problem is开发者_开发知识库 how can i save the information of image in database MySQL like: image_path; image_type; image_desc:There is a gem called Paperclip available. Use it.
You can use the gem https://github.com/thoughtbot/paperclip. The image_desc you can to save independently.
Image.create(:image => params[:file], :image_desc => params[:desc])
精彩评论