Forum Moderators: open
which is better? storing the PDFs in the DB or uploading the files to a folder - probably best to rename them so they dont mistakenly get overwritten by newer files and also to identify the files if something happened to the DB.
I was thinking if i was to create a table that links with a user table. each user will have about 8 pdf files uploaded to their account by admin so they can download when logged in.
these files would be deleted after about 6-9 months by a cron job, so at any time we expect upto 300 users with 8 pdf files.
the 8 files will total about 2.5MB
any thoughts?
Cheers
Offhand, the only time I can think of is if you have multiple load balanced web servers using the same database. It would probably make more sense to have the files stored in 1 database instead of having to have a copy on each web server. Although in that case it might be better, in my opinion, to either use a NAS or dedicate one server for images (using something like images.example.com to server images for example.com), although that may require additional hardware and/or recoding lots of pages.