Documentation clarificartion
pieterdt opened this issue · 2 comments
Description of the problem
In the example for using the library with symfony (https://github.com/maennchen/ZipStream-PHP/wiki/Symfony-example) there is a note about setting the zeroheader because, if not, it might cause issues with truncated zipfiles.
Can it be clarified what kind of problems that would be? I noticed that having this set to true, results in Safari (with the default setting of auto opening safe file formats) extracts only the first file of the archive.
In a small test setup I did, this problem is solved by setting this zeroheader to false. I'm hesitant to take on that setting because of the remark in the documentation.
Informations
- ZipStream-PHP version:
2.1.0
I have done some further testing to try to understand the impact of the setting of the zeroheader.
When my files are local, it does not cause any issue. The zip is valid with either the setting to true or false.
When my files are opened from s3 (using the aws/aws-sdk-php package), they work only when the setting is set to true.
So I would suggest that the comment in the wiki would not say '// this is needed to prevent issues with truncated zip files' , but something like:
'//due to the nature of S3 streams this setting must be set to true'