Topic: Uploads of image file using RoR

Hi Friends,
I am facing a difficulty in uploading an image file in RoR.
Here is my case.
1 I have to accept a file from the user.
2 Resize the image file using RMagick
3 Store that file with the file-name "logo#{user_id}" on the file-system
   *where user_id is the id of the image uploding user.

I tried using many a plug-ins like file_column and upload_column for uploading a file. They work fine they upload the file after resizing the image but I am not able to rename the file as "logo#{user_id}". The file is stored with its actual name and a column in the table for example "filename" is getting populated.

Is there any ways that I can name the file and upload the image file after resizing it with Rmagick.

Thanks in advance.

Re: Uploads of image file using RoR

You may want to consider storing the image in the database instead of on the filesystem.