A system we are developing has as a requirement the saving of file attachments. We are currently saving these as BLOBs in our MySQL database, which works well. However the database is growing in size very quickly, so we are considering saving the files in a standardised directory structure on the server. This would allow us to carry out smaller incremental backups.
How can we go about this? We do not want to give all clients access to the drive on the server, so the saving must be done through the server somehow. We thought of saving the attachment as a BLOB to a temporary database table and having a server side script periodically look at the table, extracting anything it found and writing it to the server’s disk. However, this seems rather complicated.
Does anyone have any other ideas?