I'm trying to insert images to each one of my blog posts using SQLite with Sequel and Sinatra.
DB.create_table :posts do
primary_key :id
String :title
String :content
Datetime :created_at
Datetime :updated_at
foreign_key(:user_id, :users, :type=>String)
end
What changes should I make to my db for that and how can insert the image from the view and later display it?
Any help or idea is highly appreciated.