Bladeren bron

companion: fix wss breaking change

ifedapoolarewaju 5 jaren geleden
bovenliggende
commit
55fbe97eb7
1 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 2 2
      packages/@uppy/companion/src/companion.js

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

@@ -129,9 +129,9 @@ module.exports.socket = (server) => {
   // A new connection is usually created when an upload begins,
   // or when connection fails while an upload is on-going and,
   // client attempts to reconnect.
-  wss.on('connection', (ws) => {
+  wss.on('connection', (ws, req) => {
     // @ts-ignore
-    const fullPath = ws.upgradeReq.url
+    const fullPath = req.url
     // the token identifies which ongoing upload's progress, the socket
     // connection wishes to listen to.
     const token = fullPath.replace(/^.*\/api\//, '')