chunksUploaded (file, done) {
      file.previewElement.querySelector('.progress').setAttribute('value', 100)
      file.previewElement.querySelector('.progress').innerHTML = '100%'

      return axios.post('api/upload/finishchunks', {
        // The API supports an array of multiple files
        files: [{
          uuid: file.upload.uuid,
          original: file.name,
          size: file.size,
          type: file.type,
          count: file.upload.totalChunkCount,
          albumid: page.album
        }]
      }, {
        headers: {
          token: page.token
        }
      }).then(function (response) {
        file.previewElement.querySelector('.progress').style.display = 'none'

        if (response.data.success === false)
          file.previewElement.querySelector('.error').innerHTML = response.data.description

        if (response.data.files && response.data.files[0])
          page.updateTemplate(file, response.data.files[0])

        return done()
      }).catch(function (error) {
        return {
          success: false,
          description: error.toString()
        }
      })
    }
// when set to true, sometimes it often hangs with hundreds of parallel uploads
when set to true, sometimes it often hangs with hundreds of parallel uploads
when set to true sometimes it often hangs with hundreds of parallel uploads
chunksUploaded (file, done) {
      file.previewElement.querySelector('.progress').setAttribute('value', 100)
      file.previewElement.querySelector('.progress').innerHTML = '100%'
      return axios.post('api/upload/finishchunks', {
        files: [{
          uuid: file.upload.uuid,
          original: file.name,
          size: file.size,
          type: file.type,
          count: file.upload.totalChunkCount,
          albumid: page.album
        }]
      }, {
        headers: {
          token: page.token
        }
      }).then(function (response) {
        file.previewElement.querySelector('.progress').style.display = 'none'
        if (response.data.success === false)
          file.previewElement.querySelector('.error').innerHTML = response.data.description
        if (response.data.files && response.data.files[0])
          page.updateTemplate(file, response.data.files[0])
        return done()
      }).catch(function (error) {
        return {
          success: false,
          description: error.toString()
        }
      })
    }
chunksUploaded ( file , done ) { file . previewElement . querySelector ( '.progress' ) . setAttribute ( 'value' , 100 ) file . previewElement . querySelector ( '.progress' ) . innerHTML = '100%' return axios . post ( 'api/upload/finishchunks' , { files : [ { uuid : file . upload . uuid , original : file . name , size : file . size , type : file . type , count : file . upload . totalChunkCount , albumid : page . album } ] } , { headers : { token : page . token } } ) . then ( function ( response ) { file . previewElement . querySelector ( '.progress' ) . style . display = 'none' if ( response . data . success === false ) file . previewElement . querySelector ( '.error' ) . innerHTML = response . data . description if ( response . data . files && response . data . files [ 0 ] ) page . updateTemplate ( file , response . data . files [ 0 ] ) return done ( ) } ) . catch ( function ( error ) { return { success : false , description : error . toString ( ) } } ) }
when set to true, sometimes it often hangs with hundreds of parallel uploads
when set to true sometimes it often hangs with hundreds of parallel uploads
// The API supports an array of multiple files