diff --git a/app/ui/client/lib/recorderjs/audioEncoder.js b/app/ui/client/lib/recorderjs/audioEncoder.js index ffa950e587ea..d05604110065 100644 --- a/app/ui/client/lib/recorderjs/audioEncoder.js +++ b/app/ui/client/lib/recorderjs/audioEncoder.js @@ -40,7 +40,7 @@ class AudioEncoder extends EventEmitter { handleWorkerMessage = (event) => { switch (event.data.command) { case 'end': { - const blob = new Blob(event.data.buffer, { type: 'audio/mp3' }); + const blob = new Blob(event.data.buffer, { type: 'audio/mpeg' }); this.emit('encoded', blob); this.worker.terminate(); break; diff --git a/server/startup/migrations/index.js b/server/startup/migrations/index.js index 5628426c442d..52bfb3888d84 100644 --- a/server/startup/migrations/index.js +++ b/server/startup/migrations/index.js @@ -198,4 +198,5 @@ import './v198'; import './v199'; import './v200'; import './v201'; +import './v202'; import './xrun'; diff --git a/server/startup/migrations/v202.js b/server/startup/migrations/v202.js new file mode 100644 index 000000000000..15f18cd54c67 --- /dev/null +++ b/server/startup/migrations/v202.js @@ -0,0 +1,15 @@ +import { Migrations } from '../../../app/migrations/server'; +import Uploads from '../../../app/models/server/models/Uploads'; + +Migrations.add({ + version: 202, + up() { + Promise.await(Uploads.model.rawCollection().updateMany({ + type: 'audio/mp3', + }, { + $set: { + type: 'audio/mpeg', + }, + })); + }, +});