瀏覽代碼

providers: change versions header

Ifedapo Olarewaju 6 年之前
父節點
當前提交
0abcdf452a
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      packages/@uppy/companion/src/uppy.js
  2. 1 1
      packages/@uppy/provider-views/src/index.js

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

@@ -218,7 +218,7 @@ const getOptionsMiddleware = (options) => {
       options,
       s3Client,
       authToken: req.header('uppy-auth-token') || req.query.uppyAuthToken,
-      clientVersion: req.header('uppy-client') || req.query.uppyClient,
+      clientVersion: req.header('uppy-versions') || req.query.uppyVersions,
       buildURL: getURLBuilder(options)
     }
     next()

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

@@ -413,7 +413,7 @@ module.exports = class ProviderView {
     const authState = btoa(JSON.stringify({ origin: location.origin }))
     // @todo remove this hardcoded version
     const clientVersion = 'companion-client:1.0.2'
-    const link = `${this.provider.authUrl()}?state=${authState}&uppyClient=${clientVersion}`
+    const link = `${this.provider.authUrl()}?state=${authState}&uppyVersions=${clientVersion}`
 
     const authWindow = window.open(link, '_blank')
     const handleToken = (e) => {