aboutsummaryrefslogtreecommitdiff
path: root/public/js
diff options
context:
space:
mode:
authorpolo <ordipolo@gmx.fr>2025-10-28 11:51:59 +0100
committerpolo <ordipolo@gmx.fr>2025-10-28 11:51:59 +0100
commitcf8c9c1d380afbd8529a6da0afd55a9e3d8f1bf4 (patch)
tree27971165b002118646b3f119bdc744209b368743 /public/js
parent4de8bf833d856a8b6668042736dc92add418f6e1 (diff)
downloadcms-cf8c9c1d380afbd8529a6da0afd55a9e3d8f1bf4.zip
gestion erreur upload format .ico
Diffstat (limited to 'public/js')
-rw-r--r--public/js/Input.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/public/js/Input.js b/public/js/Input.js
index 9a131c8..be7cd8d 100644
--- a/public/js/Input.js
+++ b/public/js/Input.js
@@ -98,7 +98,8 @@ class InputFile extends InputToggler{
98 this.close(); 98 this.close();
99 } 99 }
100 else{ 100 else{
101 console.error("Erreur: le serveur n'a pas enregistré l'image'."); 101 this.onFailure(data);
102 console.error(data.message);
102 } 103 }
103 }) 104 })
104 .catch(error => { 105 .catch(error => {
@@ -108,6 +109,11 @@ class InputFile extends InputToggler{
108 onSuccess(data){ 109 onSuccess(data){
109 this.content_elem.src = data.location; 110 this.content_elem.src = data.location;
110 } 111 }
112 onFailure(data){
113 if(data.format === 'ico'){
114 toastNotify("Format ICO mal géré par le serveur, essayez avec un PNG.");
115 }
116 }
111} 117}
112 118
113class InputFileFavicon extends InputFile{ 119class InputFileFavicon extends InputFile{