Download the PHP package filestack/filestack-php without Composer
On this page you can find all versions of the php package filestack/filestack-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download filestack/filestack-php
More information about filestack/filestack-php
Files in filestack/filestack-php
Package filestack-php
Short Description A Filestack library for PHP
License Apache-2.0
Informations about the package filestack-php
Filestack PHP
This is the official PHP SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
Requirements
- PHP 8.3+
Resources
Installing
Install filestack
with composer, either run
$ composer require --prefer-dist filestack/filestack-php
Usage
Filestack library gives you access to three useful classes:
FilestackClient
- for easy file upload (creates Filelink objects)Filelink
- for file handling (downloading, converting etc.)FileSecurity
- for applying policy and signature values to your API calls
Uploading files
First, you need to create an instance of FilestackClient
Call the upload() function
Storage
Amazon S3 is used to store your files by default. If you wish to use a different one, you can pass in additional parameter 'location' when making upload() and store calls
Manipulating files
Filelink objects can be created in two ways:
- by uploading a file using FilestackClient
- by initializing Filelink with file handle and api_key
First method was shown above, the second method is also very easy and will create objects representing files that were already uploaded.
Tagging files and detecting safe for work content
For more examples, see the examples/ folder in this project.
Intelligent Ingestion
The Intelligent Ingestion feature allows user to upload a file in chunks of not precised size. This creates a more stable upload flow that ensures the file being uploaded will eventually complete successfully, regardless of network latency or timeout errors.
However, the upload process may be slower than the normal upload flow for large files, as there are errors are retried using the exponential backoff retry strategy.
Lastly, this feature has to be turned on for the apikey being used. To turn on this feature please contact Filestack at [email protected].
Versioning
Filestack PHP SDK follows the Semantic Versioning.
Code Standard
- PSR-2 coding standard (http://www.php-fig.org/psr/psr-2/)
- PSR-4 autoloading standard (http://www.php-fig.org/psr/psr-4/)
- phpDoc documentation comments standard (https://www.phpdoc.org/docs/latest/getting-started/your-first-set-of-documentation.html)
Testing
-
To run tests, from the project root director, run
-
To generate coverage report, run following command (will generage html files under directory coverage/)
- To run PHPMD for CodeClimate checks
Generating documentation
To get project metrics use phar file for https://github.com/sebastianbergmann/phploc
To generate documentation use phar file from https://github.com/theseer/phpdox
Issues
If you have problems, please create a Github Issue.
Contributing
Please see CONTRIBUTING.md for details.
Credits
Thank you to all the contributors.