diff --git a/js/components/ascribe_forms/form_register_piece.js b/js/components/ascribe_forms/form_register_piece.js index 2a0e3fa5..f79e1dca 100644 --- a/js/components/ascribe_forms/form_register_piece.js +++ b/js/components/ascribe_forms/form_register_piece.js @@ -87,10 +87,10 @@ let RegisterPieceForm = React.createClass({ const validFiles = files.filter(displayValidFilesFilter); if(validFiles.length > 0) { - const { type: fileType } = validFiles[0].type; - const fileExtension = fileType && fileType.split('/').length ? fileType.split('/')[1] + const { type: mimeType } = validFiles[0]; + const mimeSubType = mimeType && mimeType.split('/').length ? mimeType.split('/')[1] : 'unknown'; - const thumbnailKeyDialogExpanded = AppConstants.supportedThumbnailFileFormats.indexOf(fileExtension) === -1; + const thumbnailKeyDialogExpanded = AppConstants.supportedThumbnailFileFormats.indexOf(mimeSubType) === -1; this.setState({ thumbnailKeyDialogExpanded }); } else { this.setState({ thumbnailKeyDialogExpanded: false }); diff --git a/js/constants/application_constants.js b/js/constants/application_constants.js index 061eb9db..79d00747 100644 --- a/js/constants/application_constants.js +++ b/js/constants/application_constants.js @@ -88,7 +88,14 @@ const constants = { 'searchThreshold': 500, - 'supportedThumbnailFileFormats': ['png', 'jpg', 'jpeg', 'gif', 'mp4'], + 'supportedThumbnailFileFormats': [ + 'x-sgi-movie', 'x-msvideo', 'quicktime', 'mpeg', 'png', 'jpeg', 'gif', + 'ogg', 'oga', 'ogv', 'ogx', 'wmv', 'wma', 'flv', '3gpp2', '3p2', '3pg', + 'png', 'jpg', 'jpeg', 'gif', '264', '3g', '3g2', '3gp', '3gp2', '3gpp', + 'mp4', 'm4a', 'm4v', 'f4v', 'f4a', 'm4b', 'm4r', 'f4b', 'mov', 'quicktime', + 'webm', 'x264', 'mpeg', 'mpeg4', 'mpg4', 'bmp', 'eps', 'jp2', 'j2k', 'jpm', + 'mj2' + ], // in case of whitelabel customization, we store stuff here 'whitelabel': {},