This is a bare bones implementation of the awesome Resumable.js library for chunked uploads using vue 2. This project was generated by vue-cli and so comes with the standard commands. I haven't added any tests yet.
This project mainly serves as an example of one way you could set up resumable to run in a vue environment. If you want to use this as a jumping off point for your own project (without pulling and running this repo) here's how you can do that:
- Copy the two components
UploadVideos.vue
andUploadingVideo.vue
fromsrc/components
to your project (maybe also copypublic/cloud-computing.svg
if you want to use that icon - attribution Smartline from flaticon) - Install Resumablejs via
yarn add resumablejs
ornpm install resumablejs
- Add the
UploadVideos
component where you want it to go - Implement your own backend!
I set this up in a laravel project and installed pionl/laravel-chunk-upload and just copy-pasted their example upload controller without any changes, and set up a route to point at UploadController->upload() and it worked straight out of the box! Note that you'll want to disable rate limiting on your upload route, as resumablejs calls your endpoint a lot. You also want to avoid using your web middleware on that route as well if you get 419 error responses.
Enjoy!
yarn install
yarn serve
yarn build
yarn test:unit