I have one form , in which I am using file_field teg for input image
file as follows.
<%= file_field(“store”, “picture”) %>
Tha Actual fileld name of my Image field in Database is “store_photo”
with datatype LargeBLOB.
& Inside my Store Model I have specified “def picture” as follows:-
self.store_photo = picture_field.read
Now When I am trying to Uplaod file by submitting form I am getting
undefined method `read’ for “logo.gif”:String
Why I am getting this error? PLease tell me how to upload file into my
database from a form & also if later I want to retrieve that image from
database & display it on page how to do it?