Need to create zip archive of files for single download
emergingdzns - 5 months ago
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?