Browse Source

Merge pull request #1694 from transloadit/set-real-versions

companion-client: send correct versions to companion
Ifedapo .A. Olarewaju 5 years ago
parent
commit
d19a4fc37b

+ 1 - 1
packages/@uppy/companion-client/src/RequestClient.js

@@ -28,7 +28,7 @@ module.exports = class RequestClient {
     return {
       'Accept': 'application/json',
       'Content-Type': 'application/json',
-      'Uppy-Versions': '@uppy/companion-client=1.0.3'
+      'Uppy-Versions': `@uppy/companion-client=${RequestClient.VERSION}`
     }
   }
 

+ 1 - 2
packages/@uppy/provider-views/src/index.js

@@ -428,8 +428,7 @@ module.exports = class ProviderView {
 
   handleAuth () {
     const authState = btoa(JSON.stringify({ origin: getOrigin() }))
-    // @todo remove this hardcoded version
-    const clientVersion = encodeURIComponent('@uppy/companion-client=1.0.2')
+    const clientVersion = encodeURIComponent(`@uppy/provider-views=${ProviderView.VERSION}`)
     const link = `${this.provider.authUrl()}?state=${authState}&uppyVersions=${clientVersion}`
 
     const authWindow = window.open(link, '_blank')