Fix: allow selecting .tar.gz archives in macOS Finder by broadening input accept attribute and adding client-side validation
This commit is contained in:
1 parent
8b57981b1b
commit
a09f13de71
2 files changed
+8
-1
No files matched your search
@@ -4584,6 +4584,13 @@ async function handleBackupUpload(input) {
|
||||
const file = input?.files?.[0];
|
||||
if (!file) return;
|
||||
|
||||
const lowerName = file.name.toLowerCase();
|
||||
if (!lowerName.endsWith('.tar.gz') && !lowerName.endsWith('.tgz')) {
|
||||
showToast("Format de fichier non supporté. Veuillez sélectionner une archive de sauvegarde .tar.gz ou .tgz", 'error');
|
||||
input.value = '';
|
||||
return;
|
||||
}
|
||||
|
||||
const ok = confirm(`⚠️ RESTAURATION DISASTER RECOVERY VIA FICHIER TÉLÉVERSÉ ⚠️\n\nFichier sélectionné : ${file.name} (${(file.size / (1024 * 1024)).toFixed(2)} Mo)\n\nVoulez-vous restaurer immédiatement le système NexusPBX avec cette archive ?\nToutes les données actuelles seront remplacées.`);
|
||||
if (!ok) {
|
||||
input.value = '';
|
||||
|
||||
Reference in new issue
Block a user