Add missing mime types in admin settings view (#5934)

Co-authored-by: daniel <danielsupernault@gmail.com>
pull/5979/head
Nicolas Jeannerod 2025-05-13 10:28:23 +02:00 zatwierdzone przez GitHub
rodzic 96c6d28384
commit 382502b28c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: B5690EEEBB952194
1 zmienionych plików z 9 dodań i 5 usunięć

Wyświetl plik

@ -1021,16 +1021,20 @@
res += 'image/webp,'
}
if(this.mediaTypes.mp4) {
res += 'video/mp4,'
if(this.mediaTypes.avif) {
res += 'image/avif,'
}
if(this.mediaTypes.heic) {
res += 'image/heic,'
}
if(this.mediaTypes.avif) {
res += 'image/avif,'
if(this.mediaTypes.mp4) {
res += 'video/mp4,'
}
if(this.mediaTypes.mov) {
res += 'video/mov,'
}
if(res.endsWith(',')) {
@ -1096,7 +1100,7 @@
if(types && types.length) {
types.forEach((type) => {
let mime = type.split('/')[1];
if(['jpeg', 'png', 'gif', 'webp', 'mp4', 'avif'].includes(mime)) {
if(['jpeg', 'png', 'gif', 'webp', 'avif', 'heic', 'mp4', 'mov'].includes(mime)) {
this.mediaTypes[mime] = true;
}
})