How to store pdf's?

Hi, can anyone help me, I want people to be able to send me pdf’s (to my website), and I wanna store than in a database.

Thanks you

You could use Paperclip to store to a database but you would need to
modify it to let the storage type be a database.

It would be eaiser to use S3 as storage if it is not a requirement for
you to have the PDFs stored in a database.


It would be no different to handling any other file (for that's what a
PDF is - just a file).

Look at some results on Google for "Rails file upload". Gems such as
Paperclip help with this. You can validate that the files uploaded are
PDFs by looking at their mime type (or just the file extension if you
trust it).

Personally, I'd advise against storing files in a DB - file systems do
a much better job of managing files in most cases - but the choice is


What are file systems? you mean life filesonic or megaupload?

Using amazon s3 is the best way to do it professionally. They give you
a free trail period after getting ur credit card details. I goggled
out and found this link:
. Hope it might be useful.