在S3上压缩文件并使用PHP下载

时间:2022-01-20 23:03:54

I have an app where I need to allow users to download many media items at once, possibly over 500. We do all our storage on S3 and I am finding it difficult to handle a large request of media, potentially over 400 items.

我有一个应用程序,我需要允许用户一次下载许多媒体项目,可能超过500.我们在S3上执行所有存储,我发现很难处理大量媒体请求,可能超过400项。

I was wondering, does anybody know of a way to compress the media on S3 and then download a single archive? Is that supported? If not, can anyone recommend a service that would accomplish this?

我想知道,有没有人知道在S3上压缩媒体然后下载单个存档的方法?这支持了吗?如果没有,任何人都可以推荐一项可以实现此目的的服务吗

Our current setup is set to download all the media from S3 and then compress it locally but we are running into server timeouts when we try to accomplish this on a large scale.

我们当前的设置设置为从S3下载所有媒体然后在本地压缩它,但是当我们尝试大规模地完成此操作时,我们正在遇到服务器超时。

Thanks!

谢谢!

1 个解决方案

#1


1  

The bad news is that the AWS PHP SDK doesn't support zipping out of the box.

坏消息是AWS PHP SDK不支持开箱即用。

The good news is that there are several 3rd-party libraries that do this for you, e.g.:

好消息是有几个第三方库为你做这件事,例如:

#1


1  

The bad news is that the AWS PHP SDK doesn't support zipping out of the box.

坏消息是AWS PHP SDK不支持开箱即用。

The good news is that there are several 3rd-party libraries that do this for you, e.g.:

好消息是有几个第三方库为你做这件事,例如: