Download the PHP package flowjs/flow-php-server without Composer
On this page you can find all versions of the php package flowjs/flow-php-server. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download flowjs/flow-php-server
More information about flowjs/flow-php-server
Files in flowjs/flow-php-server
Package flow-php-server
Short Description PHP library for handling chunk uploads. Works with flow.js html5 file uploads.
License MIT
Informations about the package flow-php-server
flow.js php server
PHP library for handling chunk uploads. Library contains helper methods for:
- Testing if uploaded file chunk exists.
- Validating file chunk
- Creating separate chunks folder
- Validating uploaded chunks
- Merging all chunks to a single file
This library is compatible with HTML5 file upload library: https://github.com/flowjs/flow.js
How to get started?
Setup Composer: https://getcomposer.org/doc/00-intro.md
Run this command in your project:
This will create a vendor directory for you, which contains an autoload.php file.
Create a new php file named upload.php
:
Make sure that ./chunks_temp_folder
path exists and is writable. All chunks will be saved in this folder.
If you are stuck with this example, please read this issue: How to use the flow-php-server
Advanced Usage
Delete unfinished files
For this you should setup cron, which would check each chunk upload time. If chunk is uploaded long time ago, then chunk should be deleted.
Helper method for checking this:
Cron task can be avoided by using random function execution.
Contribution
Your participation in development is very welcome!
To ensure consistency throughout the source code, keep these rules in mind as you are working:
- All features or bug fixes must be tested by one or more specs.
- Your code should follow PSR-2 coding style guide