When saving database information with attachments like JPG's or PDF files, I've always saved the binary file in it's own directory and simply made a link pointing to it in the database. I have to believe that it is common practice to embed the file in the database.
To accomplish this, I'm guessing you have some sort of dynamically sized binary field in a table that relates to your main data and that you simply read the file and save it, and reverse the process to write it.
The main reason I'm doing this is the security issue of leaving say, a sensitive PDF file floating out on a web server or something.
Any advice or pitfalls I should watch for?
I'm using SqlTools Pro and a MySql server.
Thanks!
To accomplish this, I'm guessing you have some sort of dynamically sized binary field in a table that relates to your main data and that you simply read the file and save it, and reverse the process to write it.
The main reason I'm doing this is the security issue of leaving say, a sensitive PDF file floating out on a web server or something.
Any advice or pitfalls I should watch for?
I'm using SqlTools Pro and a MySql server.
Thanks!
Comment