diff --git a/src/socket.io/uploads.js b/src/socket.io/uploads.js index 9355a8ac71..b248868fbd 100644 --- a/src/socket.io/uploads.js +++ b/src/socket.io/uploads.js @@ -15,7 +15,7 @@ uploads.upload = async function (socket, data) { 'user.updateCover': socketUser.updateCover, 'groups.cover.update': socketGroup.cover.update, }; - if (!data || !data.chunk || !data.params || !data.params.method || !methodToFunc[data.params.method]) { + if (!socket.uid || !data || !data.chunk || !data.params || !data.params.method || !methodToFunc[data.params.method]) { throw new Error('[[error:invalid-data]]'); }