Skip to content

resumable js

Martin Kluska edited this page May 8, 2018 · 3 revisions
Package View Javascript handler class
Github Source Source ResumableJSUploadHandler
  1. Read the official docs
  2. Create the view as package requires
  3. Implement the basic resumable.js code
var resumable = new Resumable({
    // Use chunk size that is smaller than your maximum limit due a resumable issue
    // https://github.com/23/resumable.js/issues/51
    chunkSize: 1 * 1024 * 1024, // 1MB
    simultaneousUploads: 3,
    testChunks: false,
    throttleProgressCallbacks: 1,
    // Get the url from data-url tag
    target: $fileUpload.data('url'),
    // Append token to the request - required for web routes
    query:{_token : $('input[name=_token]').val()}
});