Download the PHP package heryfitiavana/rcu-laravel without Composer
On this page you can find all versions of the php package heryfitiavana/rcu-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download heryfitiavana/rcu-laravel
More information about heryfitiavana/rcu-laravel
Files in heryfitiavana/rcu-laravel
Package rcu-laravel
Short Description Resumable chunk upload for Laravel
License MIT
Homepage https://github.com/heryfitiavana22/rcu-laravel
Informations about the package rcu-laravel
rcu-laravel
Resumable chunk upload for Laravel.
Installation
Via composer :
Usage
CSRF
Add the csrf token to the Uploader in frontend
Defining Routes
Add the following routes to your routes/web.php
file:
Default RCU configuration : RCUConfig
Custom RCU configuration
### Custom RCU configuration
You can customize the package's behavior by defining a custom configuration array. Here's an example:
### Use the configuration
Go to `app/Providers/AppServiceProvider.php` and add the following code
API
RCUConfig
store
- Type:
StoreProviderInterface
- Default:
JsonStoreProvider
The store
parameter is used to store information about the upload, such as the number of the last uploaded chunk, the total number of chunks, etc. The default store is JSON, but you can implement your own by implementing the StoreProviderInterface.
tmpDir
- Type:
string
- Default:
rcu/tmp
Directory to save all binary chunks.
outputDir
- Type:
string
- Default:
rcu/output
Directory to save the complete file.
onCompleted
- Type:
(data: ['outputFile' => string, 'fileId' => string]) => void
This callback function can be used to perform any additional actions or operations after the upload is completed, such as updating a database record or sending a notification.
outputFile
: Path of the uploaded file.fileId
: The ID of the file used to identify the upload. This is specified from frontend.
StoreProviderInterface
License
The MIT License (MIT). Please see License File for more information.
All versions of rcu-laravel with dependencies
illuminate/http Version ^11.13
illuminate/routing Version ^11.13