Has anyone used file_column to store the upload file in DB?
I have a requirement to upload files and store in the database instead
of the file system. The upload file can be any type, images or
documents, .doc, .xls, .pdf…
I can find plenty of examples of file_column that store the actual
file in the file system.
I need help to figure out how to store the document in the database.
I need help to figure out how to store the document in the database.
The DB storage needs to be a BLOB (or the equivalent) since you want to
store an arbitrary number of types of ‘things’ of presumably arbitrary
size. There is a resource out there on the web, somewhere (if I could
recall where, the link would be yours, but I seem to recall muddling
through it with attachment_fu, so you might want to check those
references).
I did that personally as a proof of concept in my app about a year ago,
but found the DB storage and retrieval much, much too slow as compared
to the file system.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.