I sell songs hosted in S3. People select them and they can download, but if they buy the entire CD, they can download it as a zip file. The problem is that i have to create the zip file on the fly, which is very slow. I am using the Zip Library, adding files from string with file get contents and after that (which may take its time), the user client stars the download, which is a lot of time. Is there another way to provide it faster, maybe with some other libraries?
Asked
Active
Viewed 6,675 times
3
-
2Do you not have enough storage to store a zipped version of the album along with the unzipped? – Rob Jan 03 '13 at 03:51
-
this is an incredible solution, that solves the speed problems http://www.w2lessons.com/2012/01/fast-zipping-in-amazon-s3.html – Ankan-Zerob Jul 29 '14 at 08:52
2 Answers
5
Create the zip file once, preferably when you put together the tracks, and upload it along with the individual tracks. No need to overcomplicate things.

ceejayoz
- 176,543
- 40
- 303
- 368
0
Here are some helpful links that may provide some insight as to how to do this better:
LAMP: How to create .Zip of large files for the user on the fly, without disk/CPU thrashing

Community
- 1
- 1

Josh Brody
- 5,153
- 1
- 14
- 25