Download the PHP package le0daniel/laravel-resumablejs without Composer
On this page you can find all versions of the php package le0daniel/laravel-resumablejs. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download le0daniel/laravel-resumablejs
More information about le0daniel/laravel-resumablejs
Files in le0daniel/laravel-resumablejs
Package laravel-resumablejs
Short Description Very flexible integration of chunk and async uploading
License MIT
Informations about the package laravel-resumablejs
laravel-resumablejs
This laravel Package implements a chunk uploading feature using upload handlers. The idea is, that you have one single Upload route and you pass the handler name to init the Upload to it. This handler then handles the authorization, and file processing. The Upload itself is managed by the Upload Controller globally.
Installation
The installation is done via composer
As the package comes with some migrations, run them.
The package comes with a config, so you should publish the package using
Installation
In the resumablejs.php
config file, you need to declare Handlers to use this package.
A handler always needs to extend the le0daniel\LaravelResumableJs\Contracts\UploadHandler
Contract.
The methods to implement are pretty straight forward.
Javascript
A simple implementation of Resumable.js
Requirements: axios
,resumable.js
It's important to set the forceChunkSize parameter because each chunk is checked to have the exact Chunk size (except if it's the last one).
If not, the chunk is marked as invalid and refused.
Also, the chunkSize must be the same as defined in the laravel config (resumablejs.php
)
Once a file is added, you need to call the init method with a handler name to get an upload token, which is then used to perform the upload itself.
As soon as the upload is done, we will call the complete endpoint to process the file
Done, you can now upload large files in chunks and process them easily.