This repo contains full example for laravel-chunk-upload package.
- PHP >= 7.2.0
- OpenSSL PHP Extension
- PDO PHP Extension
- Mbstring PHP Extension
- Tokenizer PHP Extension
- XML PHP Extension
More at laravel.com
composer install
npm install
npm run dev
cp .env.example .env
php artisan key:generate
You can choose which version of laravel you are using.
Full example with at laravel-5-5 branch
Full example with at laravel-5-4 branch
- Run serve
php artisan serve
- Open the root page
http://localhost:8000
and open the desired examples.
- Controller - dynamic usage at ./app/Http/Controllers/UploadController.php
- Views at ./resources/views/example/ - Here you can find basic layout for the providers.
- Javascripts at ./resources/assets/js/ - Here you can find the initial setup for the providers.
It is recommended to upload the file in separate queue JOB. Uploading can take a time (for large files) and the request could
get timed out. It is important to stream the file to the cloud (not using file_get_contents
) which would eat your memory.
Also don't forget to remove the uploaded file after upload.
Example code found at ./app/Http/Controllers/UploadController.php.
laravel-chunk-upload-example was written by Martin Kluska and is released under the MIT License.
Copyright (c) 2017 Martin Kluska