Download the PHP package keekinc/s3-client without Composer
On this page you can find all versions of the php package keekinc/s3-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download keekinc/s3-client
More information about keekinc/s3-client
Files in keekinc/s3-client
Package s3-client
Short Description A fork off of the S3 Client that supports V2 Signatures
License GPLv3+
Informations about the package s3-client
Keek's Amazon S3 Connector
A lightweight Amazon S3 connector implementation for PHP 5.3 or later
Special Thanks To: akeeba/s3 for the Original Fork.
After having a lot of impossible to debug problems with Amazon's Guzzle-based AWS SDK we decided to roll our own connector for Amazon S3. This is by no means a complete implementation, just a small subset of S3's features which are required by our software. The design goals are simplicity and low memory footprint.
This code is loosely based on S3.php written by Donovan Schonknecht and available at http://undesigned.org.za/2007/10/22/amazon-s3-php-class under a BSD-like license. This repository no longer reflects the original author's work and should not be confused with it.
This software is distributed under the GNU General Public License version 3 or, at your option, any later version published by the Free Software Foundation (FSF). In short, it's "GPLv3+".
Using the connector
Get a connector object
Listing buckets
Returns an array like this:
Listing bucket contents
If you want to list "subdirectories" you need to do
The last parameter (common prefixes) controls the listing of "subdirectories"
Uploading (small) files
From a file:
From a string:
From a stream resource:
In all cases the entirety of the file has to be loaded in memory.
Uploading large file with multipart (chunked) uploads
Files are uploaded in 5Mb chunks.
As long as you keep track of the UploadId, PartNumber and ETags you can have each uploadMultipart call in a separate page load to prevent timeouts.
Get presigned URLs
Allows browsers to download files directly without exposing your credentials and without going through your server:
The last parameter controls how many seconds into the future this URL will be valid.
Download
To a file with absolute path $targetFile
To a string