使用Laravel从Amazon S3压缩和下载文件
I have a Laravel project which allows to upload photos and they are stored S3 bucket.
At particular times, it's needed to download an entire album which is a folder in S3 bucket storage. So, it should be downloaded as a ZIP file that includes photos of that album.
I managed to do this when these are stored on local storage.
public function downloadZip() {
$files = glob(public_path('js/*'));
Zipper::make('mydir/mytest3.zip')->add($files);
return response()->download(public_path('mydir/mytest3.zip'));
}
But, in S3 bucket, that method is not working.
Is there a way to do this ?
douluxia0606
2017/07/28 18:09- laravel
- php
- 点赞
- 收藏
- 回答
2个回复
