title: Uppy + tus uploads to Vimeo won't resume and are always restarting
body: <p>I have the class below based on the code found at <a href="https://github.com/transloadit/uppy-vimeo-thing/blob/master/Vimeo.js" rel="nofollow noreferrer">https://github.com/transloadit/uppy-vimeo-thing/blob/master/Vimeo.js</a>.</p>
  
  <p>Resuming an upload doesn't work, it always restarts upload from scratch. If I remove <code>uploadUrl</code> from the Tus options and set the <code>endpoint</code> value to <code>https://master.tus.io/files/</code> (thus not uploading to Vimeo), resuming an upload works as expected. This issue only happens when sending uploads to Vimeo.</p>
  
  <p>Looking at the Network tab of my Developers Tools, I see that <code>upload-offset</code> is always <code>0</code> when sending the PATCH request to Vimeo, even when resuming it (subsequent requests).</p>
  
  <pre><code>const { Plugin } = require('@uppy/core')
  const mapLimit = require('promise-map-limit')
  
  const VIMEO_API_ROOT = 'https://api.vimeo.com'
  
  class Vimeo extends Plugin {
    constructor (uppy, opts) {
      super(uppy, opts)
  
      this.name = 'Vimeo'
      this.id = 'Vimeo'
      this.type = 'uploader'
  
      this.opts = Object.assign({
        limit: 100
      }, this.opts)
  
      this.prepareUpload = this.prepareUpload.bind(this)
      this.afterUpload = this.afterUpload.bind(this)
    }
  
    async prepareUpload (fileIDs) {
      const { videoTitle } = this.opts
  
      fileIDs.forEach((fileID) =&gt; {
        this.uppy.emit('preprocess-progress', fileID, {
          mode: 'indeterminate',
          message: 'Creating video...'
        })
      })
  
      await mapLimit(fileIDs, this.opts.limit, async (fileID) =&gt; {
        const file = this.uppy.getFile(fileID)
        const response = await fetch(`${VIMEO_API_ROOT}/me/videos`, {
          method: 'post',
          headers: {
            'authorization': `Bearer ${vimeoAccessToken}`,
            'content-type': 'application/json',
            'accept': 'application/vnd.vimeo.*+json;version=3.4'
          },
          body: JSON.stringify({
            upload: {
              approach: 'tus',
              size: file.size
            },
            name: videoTitle
          })
        })
  
        const { upload, link, uri } = await response.json()
        this.uppy.setFileState(fileID, {
          uploadURL: link,
          vimeo: {
            link,
            id: uri.split('/').pop()
          },
          tus: Object.assign({}, file.tus, {
            endpoint: 'https://files.tus.vimeo.com/files/', // HACK this is to appease tus-js-client
            // NOTE: This is uploadUrl instead of endpoint, different from what you might expect;
            // Vimeo pre-creates the Tus upload.
            uploadUrl: upload.upload_link,
            headers: {
              'Accept': 'application/vnd.vimeo.*+json;version=3.4'
            }
          }),
        })
  
        this.uppy.emit('preprocess-complete', fileID)
      })
    }
  
    async afterUpload (fileIDs) {
      fileIDs.forEach((fileID) =&gt; {
        const file = this.uppy.getFile(fileID)
        const video = file.vimeo
  
        this.uppy.setFileState(fileID, {
          uploadURL: video.link
        })
      })
    }
  
    install () {
      this.uppy.addPreProcessor(this.prepareUpload)
      this.uppy.addPostProcessor(this.afterUpload)
    }
  
    uninstall () {
      this.uppy.removePreProcessor(this.prepareUpload)
      this.uppy.removePostProcessor(this.afterUpload)
    }
  }
  
  module.exports = Vimeo
  
  </code></pre>