Need to create zip archive of files for single downloadCreated 5 years ago by emergingdzns
Argh. I need to be able to grab a set of files (images stored individually in S3 using the files field type) and then zip them up into a single zip file and force a download.
I can't seem to use default php ZipArchive. I tried the "Zipper" wrapper but it will only do one file or will do a "glob" of files, but they are stored in a single folder with thousands of other files. I can pull the ids and names from the files object, but then when I tried to use the default Laravel Storage class to write the files to a new folder in /tmp I'm getting a streams error.
Anyone have a simpler way to do this?
Ya and meanwhile.. this would be a great feature for files. @emergingdzns mind making an issue for it? Pretty easy to do. I can knock it out.
@ryanthompson I'm creating the issue now in the Files Module in github. @piterden I thought Storage class was a built-in part of the Laravel filesystem....
Try to use not Storage, but Filesystem class