web/satellite: makes sure files with uppercase extensions are able to be previewed in the object browser

Change-Id: I7f50cca64df8ac394e7b985368a8155b4a540889
This commit is contained in:
Malcolm Bouzi 2021-12-08 13:13:25 -05:00
parent c884f327c8
commit 1dce461f55

View File

@ -433,7 +433,7 @@ export default class FileModal extends Vue {
public get previewIsImage(): boolean {
if (typeof this.extension === 'string') {
return ['bmp', 'svg', 'jpg', 'jpeg', 'png', 'ico', 'gif'].includes(
this.extension
this.extension.toLowerCase()
);
}
@ -446,7 +446,7 @@ export default class FileModal extends Vue {
public get previewIsVideo(): boolean {
if (typeof this.extension === 'string') {
return ['m4v', 'mp4', 'webm', 'mov', 'mkv'].includes(
this.extension
this.extension.toLowerCase()
);
}
@ -458,7 +458,7 @@ export default class FileModal extends Vue {
*/
public get previewIsAudio(): boolean {
if (typeof this.extension === 'string') {
return ['mp3', 'wav', 'ogg'].includes(this.extension);
return ['mp3', 'wav', 'ogg'].includes(this.extension.toLowerCase());
}
return false;