简体   繁体   中英

Laravel- Create Archive and download the files from Amazon S3

I am looking for more of a better approach here. I have an app developed in Laravel that stores images on AWS S3 , then users can download the images. My process is as follows

  • Operators upload the pictures, low quality thumbnails are created on the fly and stored on server while original images are uploaded to S3
  • Users come on the site and they can download pictures by ALL or One by One
  • One by one thing works fine as it downloads directly from S3 to the user's system
  • When user requests for Download All , it first fetches all the images from S3 to my server, creates a zip and then download the zipped file.

Both scenarios are working fine but in Download All case, ti takes too much time as some times there is more than 1gb of data to be downloaded.

Is there any better approach to do this? Like I could request for the zip and when its ready I should get an alert or any other suggestion to make this approach better

您可以使用promise检查可以启动传输异步传输then使用通知。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM