Should I store files in the database or just the links

  • # October 10, 2009 at 12:16 pm

    Hi, I want to make a download system, my plan is that after purchase you get a link to download the file, such as:

    and that will relate to the database. But, I’m not sure if I should store the files in the actual database and give that back to download. Or if I should store the files in another directory like /stuff/files/downloads/ and make it download from that so that they don’t get the link to it. The think is that people could go to that directory and take the files. Though is it safe to do that if I change the permissions so that they cannot view that directory?

    What do yo think?

    # October 10, 2009 at 2:42 pm

    In the Database – gives you better control and the whole system is data driven right. I did a system storing the path and file names as a link – wish I had stoerd them in the table now. -Scott

    # October 12, 2009 at 6:09 am

    Thanks, I did some re-search some people said out side and others inside… I am not sure…
    The main bad reason is that it will make the database HUGE! And also make some things harder that I may want to do, like dynamically add watermarks to images ect. But it will be slightly more easy. If they are out the database then it would be easy to make it more dynamic… I’m not sure yet :)

    Anyway, thanks for your advice

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.