vendredi 20 mars 2015

How to restore full path stored with Paperclip with only a database column attached_file_name?

I have mysql dump of a table images that was used to save Paperclip attachments. It has regular columns, such as:



attachment_filename
attachment_width
attachment_height
attachment_file_size
attachment_content_type
attachment_file_name


Colum attachment_filename contains only a file name, for example, logo.png. Is it possible to retrieve full path using only those data from DB ?


Looking through Paperclip source brought me to http://ift.tt/1AQOB5E but not much far.


This question is more theoretical. Of course I can use rails console to get path with ruby, but it seems to me that all needed data is already in DB.


If it is important Rails 3.2 Paperclip 2.8.0 MySQL


Aucun commentaire:

Enregistrer un commentaire