[FIX] Uploading Custom Sound files not working, but showing success (#27177)

pull/27178/head^2
Douglas Fabris 3 years ago committed by GitHub
parent 3239df00cd
commit ec84cb695d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      apps/meteor/app/custom-sounds/server/methods/uploadCustomSound.js

@ -16,10 +16,7 @@ Meteor.methods({
const rs = RocketChatFile.bufferToStream(file);
RocketChatFileCustomSoundsInstance.deleteFile(`${soundData._id}.${soundData.extension}`);
const ws = RocketChatFileCustomSoundsInstance.createWriteStream(`${soundData._id}.${soundData.extension}`, contentType);
ws.on(
'end',
setTimeout(() => api.broadcast('notify.updateCustomSound', { soundData }), 500),
);
ws.on('end', () => setTimeout(() => api.broadcast('notify.updateCustomSound', { soundData }), 500));
rs.pipe(ws);
},

Loading…
Cancel
Save