All Projects → pionl → laravel-chunk-upload-example

pionl / laravel-chunk-upload-example

Licence: other
Example project for laravel-chunk-upload

Programming Languages

javascript
184084 projects - #8 most used programming language
PHP
23972 projects - #3 most used programming language
Blade
752 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to laravel-chunk-upload-example

december-2018-meetup
🤖 Build an API with Laravel 5.7
Stars: ✭ 27 (-49.06%)
Mutual labels:  laravel5
laravel-vue-starter
Well Documented Laravel Starter App From Development to Production. For Full Blown RESTFUL API and SPA with Beautiful UI Using Buefy / ElementUi For Reusable Vue Components
Stars: ✭ 80 (+50.94%)
Mutual labels:  laravel5
spring-websocket-angular6
Example for using Spring Websocket and Angular with Stomp Messaging
Stars: ✭ 18 (-66.04%)
Mutual labels:  example-project
laravel5Angular4
Laravel 5.4 & Angular 4.3.4
Stars: ✭ 37 (-30.19%)
Mutual labels:  laravel5
material-ui-Link-within-MenuItem
Example for how to use `react-router/Link` within `material-ui/MenuItem`
Stars: ✭ 19 (-64.15%)
Mutual labels:  example-project
play-scala-log4j2-example
An example Play project using Log4J 2 as the logging engine
Stars: ✭ 14 (-73.58%)
Mutual labels:  example-project
php-framework-benchmark
php framework benchmark (include laravel、symfony、silex、lumen、slim、yii2、tastphp etc)
Stars: ✭ 17 (-67.92%)
Mutual labels:  laravel5
laravel-workflow
Use the Symfony Workflow component in Laravel
Stars: ✭ 274 (+416.98%)
Mutual labels:  laravel5
example-go-tray-gui
An example desktop system tray application that can launch HTML5 windows. Go source with a build process for Windows, Mac and Linux.
Stars: ✭ 49 (-7.55%)
Mutual labels:  example-project
solder
Supercharge Your Modpack with Solder
Stars: ✭ 27 (-49.06%)
Mutual labels:  laravel5
Excel-Favorites
⭐ This VSTO Add-In creates a custom "Favorites" ribbon. Key distinctive attributes include dedicated buttons for changing the visibility/sort order of sheets, copying visible cells, Excel's camera feature, Snipping Tool, Problem Steps Recorder (PSR) and Windows Calculator. It is written in 3 different versions as a VSTO Add-In in C# and VB.NET a…
Stars: ✭ 37 (-30.19%)
Mutual labels:  example-project
arisan
Sistem pengelolaan grup arisan berbasis web yang dibangun dengan Laravel 5.
Stars: ✭ 24 (-54.72%)
Mutual labels:  laravel5
ampjucks
Boilerplate and base project to create static websites with AMP, Nunjucks and Gulp
Stars: ✭ 18 (-66.04%)
Mutual labels:  example-project
django-tip-02
#DjangoTip 02
Stars: ✭ 32 (-39.62%)
Mutual labels:  example-project
gradle-plugin-bootstrap
All you need to create a custom Gradle plugin
Stars: ✭ 24 (-54.72%)
Mutual labels:  example-project
entref-spring-boot
A RESTful DAL (Database Abstraction Layer) reference implementation written using Spring.
Stars: ✭ 19 (-64.15%)
Mutual labels:  example-project
nginx-virtual-host-bash-script
Nginx Virtual Host Bash Script
Stars: ✭ 35 (-33.96%)
Mutual labels:  laravel5
electron-application
Example implementation of electronjs.
Stars: ✭ 11 (-79.25%)
Mutual labels:  example-project
opencore
OpenCore - Laravel for OpenCart
Stars: ✭ 42 (-20.75%)
Mutual labels:  laravel5
dgraph graphql go
A GraphQL + Dgraph + Go + HTTP based backend service demo.
Stars: ✭ 49 (-7.55%)
Mutual labels:  example-project

Laravel chunked upload example

This example covers all supported Laravel versions. This implementation will allow us to test all versions at once.

This repo contains full example for laravel-chunk-upload package.

Install

git clone [email protected]:pionl/laravel-chunk-upload-example.git --recurse-submodules --remote-submodules
npm install --only=production

Usage

Install and run specific Laravel version. Use X.* version format.

node run.js "8.*"

Pass --ignore-example to ignore updating and building example Pass --verbose for debug info

open http://localhost:8000

Compatibility

Version PHP Run Tests
9.* 8.1-node-17 node run "9.*" node tests.js "9.*"
9.* 8.0-node-17 node run "9.*" node tests.js "9.*"
8.* 8.1-node-17 node run "8.*" node tests.js "8.*"
8.* 8.0-node-17 node run "8.*" node tests.js "8.*"
8.* 7.4-node-17 node run "8.*" node tests.js "8.*"
7.* 7.4-node-17 node run "7.*" node tests.js "7.*"

Tests

Pass --verbose for debug info

Run tests on all Laravel versions (install them before using it)

node tests.js

Run tests on desired Laravel version

node tests.js "8.*"

Tests locally

Run npm install without production.

  • In one terminal run php 7.\*/artisan serve --host=0.0.0.0 --port=8000
  • In second terminal run tests ./node_modules/.bin/codeceptjs run --steps
  • npm run test-debug will show browser while tests are running.

Docker-compose

  • Environment variables should be passed: IMAGE_VERSION (php version) and LARAVEL_VERSION.
  • abort-on-container-exit needs to be used to stop Laravel server.
IMAGE_VERSION=7.4 LARAVEL_VERSION=8.\* docker-compose -f docker-compose.yml -f docker-compose-tests.yml up --abort-on-container-exit

Running tests on latest Laravel release

I did not find a way how to install Laravel on master with the latest changes from framework -- let me know if you know how

Testing your contribution

Do not commit your changes - use pull request in main repo

  • Replace laravel-chunk-upload folder with your repository (clone your fork)

  • Maintainer can pull PR

    cd laravel-chunk-upload
    git checkout -b drjdr-master master
    git pull https://github.com/drjdr/laravel-chunk-upload.git master
    cd ..
  • Run tests on all versions node tests.js to ensure backward compatibility.

Adding a support for new Laravel release

Do not commit your changes - use pull request in main repo

  • Add a new version to versions.json file.
  • Add your changes to laravel-chunk-upload folder
  • Use setup and tests on new version node setup.js "7.\*" && node tests.js "7.\*"
  • Run tests on all versions node tests.js to ensure backward compatibility.

Example code

Uploading to AMAZON s3 (or any other cloud storage)

  • 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 the upload.

Example code found at ./example/sr/Http/Controllers/UploadController.php.

Contribution in example

  • If you make changes in assets, do not forget to call node compile.js to compile the changes and publish them to all version (you can also pass desired version)

TODO

  • Improve example controller
  • Add tests to dropzone
  • clean storage after tests
  • Add tests for paraller save

Copyright and License

laravel-chunk-upload-example was written by Martin Kluska and is released under the MIT License.

Copyright (c) 2017 and beyond Martin Kluska

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].