The best way to store documents (pdf, word ...) in a database (postgres 9.4)

I would like to save documents such as a pdf file or word ... but it is not good for me to store it directly in the database. I prefer to store only the file address in a column and save the file itself in a folder next to my database. is there a trick to create a folder next to the database (mdf ldf) and keep relativism in mdf, for example (../document)?

0
source share
1 answer

after reading all the comments

suppose our site is xyz.com/index.htmlfor production and xyz.com/Dev/index.htmlfor development

/Doc application path xyz.com/ Development application path xyz.com/Dev/

DB table colummn is DOC/doc1.pdf ..... , application path + DB path in column

xyz.com/DOC/doc1.pdf xyz.com/Dev/DOC/doc1.pdf , -.

+3

Source: https://habr.com/ru/post/1607816/


All Articles