|
@@ -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\//, '')
|