Wow, sold, you say. Now how do I start using it from PHP? Step 1. Step 2. Step 3. Step 4. Some plumbing work on AWS side, configuring S3 bucket access policy. It is also very resource intensive and time consuming.
It also requires cleanup at the end and the entire process consumes almost twice the storage needed for the zipped file. Another possible option is to compress the files before putting them in S3 storage. This method works well for static files but does not address the case where clients need an assortment of files.
It also does not cover dynamically generated files. All those solutions are good, but they all fail to address the real world issue where files are generated dynamically. There is no way to know upfront what clients require or which files need sharing. It also does not address the situation where a user or web developer has less RAM and storage memory to squander around. S3zipper is written in Go Golang , and its main strength is to automate the process of compressing files in Amazon S3 and sharing them.
It can do both Zip and Tar compression methods which are obviously the most popular. All you need to do is make a few API calls, and the rest is taken care of from our end. I found this question and response here , and seeing that it seems to address php and zip downloads in a general sense, I thought I might be able to adapt it to my needs. Below is what I have in php:. Now whenever I click the download button, I get an echo of "Starting zip test" and nothing else.
No errors, and no zip file. What do I need to know or what am I doing obviously wrong? This still produces a big nasty string of binary. You will need to download the file from S3, then zip it locally. You have several options for downloading the file from S3. For example, you could use:. Once you have the file locally, update your zip command using the location where you saved the file in order to generate the.
Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more.
Zip and download files from Amazon s3 with php Ask Question. Asked 7 years, 1 month ago. Active 7 years, 1 month ago. Viewed 13k times. Thank you in advance for your help and advice. Improve this question. Community Bot 1 1 1 silver badge. KDhyne KDhyne 1 1 gold badge 1 1 silver badge 14 14 bronze badges.
0コメント