php-s3 | A PHP library for working w/ Amazon S3 | AWS library
kandi X-RAY | php-s3 Summary
kandi X-RAY | php-s3 Summary
A PHP library for working w/ Amazon S3.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Get the response .
- Get a bucket
- Update an object
- Set an AccessControlPolicy
- Set logging for a bucket
- Get Access Control Policy
- HTTP header callback
- Validate a DNS bucket name
- Protected write callback
- Set a header
php-s3 Key Features
php-s3 Examples and Code Snippets
Community Discussions
Trending Discussions on php-s3
QUESTION
I'm willing to create a php function, trigger in js, that can :
- Retrieve all AWS S3 bucket files from a specific folder (I can also provide the path of each files)
- Create a Zip containing all S3 files
- Download the Zip when the trigger is hit (cta)
I'm able to download a single file with the getObject method from this example However, I can't find any informations in order to download multiple file and Zip it.
I tried the downloadBucket method, however it download all files inside my project architecture and not as a zip file. Here is my code:
...ANSWER
Answered 2020-Oct-02 at 18:13You can use ZipArchive, list the objects from a prefix (the bucket's folder). In the case, I also use 'registerStreamWrapper' to get the keys and added to the created zip file.
Something like that:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install php-s3
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page