We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a suggestion not to raise an exception when many files are passed and some of them do not exist, even though the parameter $checkObjectExist.
In the file src\S3ObjectsStreamZip.php
foreach ($objects as $object) { /* * Added this IF to generate even if the current file doesn't exist */ if (file_exists($objectDir)) { $objectName = isset($object["name"]) ? $object["name"] : basename($object["path"]); $context = stream_context_create(array( "s3" => array("seekable" => true) )); $request = $this->s3Client->createPresignedRequest( $this->s3Client->getCommand("GetObject", [ "Key" => $object["path"], "Bucket" => $bucket, ]), "+1 day" ); $tmpfile = tempnam(sys_get_temp_dir(), crc32(time())); $httpClient->request("GET", (string) $request->getUri(), array( "synchronous" => true, "sink" => fopen($tmpfile, "w+") )); if ($stream = fopen($tmpfile, "r", false, $context)) { $zip->addFileFromStream($objectName, $stream); } } }
The text was updated successfully, but these errors were encountered:
giovanigenerali
No branches or pull requests
I have a suggestion not to raise an exception when many files are passed and some of them do not exist, even though the parameter $checkObjectExist.
In the file src\S3ObjectsStreamZip.php
The text was updated successfully, but these errors were encountered: