Solved

Where to store zip file for online downloads?  Folder or MySQL Database?

Posted on 2011-09-16
3
395 Views
Last Modified: 2012-05-12
I have a zip file that will be downloaded from a website that is connected to MySQL Database.  
Where is the proper place to store the file?  
What does the field need to be defined as in the table if that method is used?  
Any size limitation?
Thank You
0
Comment
Question by:GarySB
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 18

Accepted Solution

by:
Sudaraka Wijesinghe earned 250 total points
ID: 36553679
Although MYSQL (or any other DB system) supports storing binary objects in the database (BLOBs), it's not a good practice to do so.
Mainly because of as the amount of data grows it would slow down the DB access and will become a maintenance nightmare because you database files will be very large.

Best way to do it would be to place your binaries (zip files) on the disk, and (if they are related to any entry) on the DB have a reference to the location of that file on the disk.

If the zip files and some thing that you allow anyone to download you can place them under the web root. Or if you restrict them for certain users you should place them somewhere out side the web root and when some one need to download that (after authentication) create a temporary symbolic link to the zip file (in Linux) or use a proxy web page (php/asp script or what ever) to read the file and write the output to HTTP stream.
0
 
LVL 23

Expert Comment

by:nemws1
ID: 36556762
I just want to second sudaraka's comments - he is 100% correct.
0
 

Author Closing Comment

by:GarySB
ID: 36561697
Thanks
0

Featured Post

Report: Liquid Web beats Amazon, Rackspace & More

A study by performance analyst firm Cloud Spectator finds that Liquid Web beats rivals Amazon, Rackspace and DigitalOcean when it comes to website and cloud application performance.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
FAQ pages provide a simple way for you to supply and for customers to find answers to the most common questions about your company. Here are six reasons why your company website should have a FAQ page
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question