diff --git a/contentcuration/contentcuration/frontend/shared/mixins.js b/contentcuration/contentcuration/frontend/shared/mixins.js index 5f200ef18c..01095f6df2 100644 --- a/contentcuration/contentcuration/frontend/shared/mixins.js +++ b/contentcuration/contentcuration/frontend/shared/mixins.js @@ -117,6 +117,7 @@ export const constantStrings = createTranslator('ConstantStrings', { mp3: 'MP3 audio', pdf: 'PDF document', epub: 'EPub document', + bloompub: 'BloomPub document', jpg: 'JPG image', jpeg: 'JPEG image', png: 'PNG image', diff --git a/contentcuration/contentcuration/frontend/shared/views/files/Uploader.vue b/contentcuration/contentcuration/frontend/shared/views/files/Uploader.vue index 3d4997e1c6..7e208cc82f 100644 --- a/contentcuration/contentcuration/frontend/shared/views/files/Uploader.vue +++ b/contentcuration/contentcuration/frontend/shared/views/files/Uploader.vue @@ -14,7 +14,7 @@ ref="fileUpload" style="display: none;" type="file" - :accept="acceptedMimetypes" + :accept="acceptedFileTypes" :multiple="allowMultiple" data-test="upload-dialog" @change="handleFiles($event.target.files)" @@ -129,8 +129,12 @@ : !fp.supplementary && (!this.displayOnly || fp.display) ); }, - acceptedMimetypes() { - return flatMap(this.acceptedFiles, f => f.associated_mimetypes).join(','); + acceptedFileTypes() { + return uniq( + flatMap(this.acceptedFiles, f => f.associated_mimetypes).concat( + this.acceptedExtensions.map(ext => `.${ext}`) + ) + ).join(','); }, acceptedExtensions() { return uniq(flatMap(this.acceptedFiles, f => f.allowed_formats));