How to resize an image uploaded by a web form before saving it to the
disk? (i need all uploaded images to have similar size)
How to create thumbnails? Is it enough if i specify small size of the
image in html or would the image look horrible? Can i do it somehow in
‘realtime’ using javascript? Or is it best to create thumbnail as a
separate file?
How to resize an image uploaded by a web form before saving it to the
disk? (i need all uploaded images to have similar size)
rmagick
How to create thumbnails? Is it enough if i specify small size of the
image in html or would the image look horrible? Can i do it somehow in
‘realtime’ using javascript? Or is it best to create thumbnail as a
separate file?
It’s better to create the thumbnail.
Check the file_column plugin.
I took a (very) quick look on file_column plugin and got few questions:
Does it keep the file or just the filename in the database?
Can i change the name of uploaded file before saving it?
BTW. Generally, is it better to save the file to the database or just
store there its name and the file itself on the disk?
I took a (very) quick look on file_column plugin and got few questions:
Does it keep the file or just the filename in the database?
the filename.
Can i change the name of uploaded file before saving it?
Look at file_column documentation and source code, since i don’t
remember if
you can change the filename.
BTW. Generally, is it better to save the file to the database or just
store there its name and the file itself on the disk?
It seems that file systems are good at storing files ;-).
Your web server can serve static content as images/files in general
faster
if they are stored on the disk.
–
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.