From 14e390d2279aca0b6addcb90815133f591cbaded Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Jun 28 2017 09:15:53 +0000 Subject: Return a human-friendly error message when upload fails Instead of giving the object which won't tell anything to the user, give a human-friendly error message. It is not very descriptive but we do not have more info. So stick with this. Fixes https://pagure.io/pagure/issue/2367 Signed-off-by: Pierre-Yves Chibon --- diff --git a/pagure/static/upload.js b/pagure/static/upload.js index 6c9c251..632bdec 100644 --- a/pagure/static/upload.js +++ b/pagure/static/upload.js @@ -59,7 +59,7 @@ function doUpload(csrf_token, files) { // How'd it go? if (data.output === "notok") { // Uh-oh. - window.alert(data); + window.alert('Upload failed or not allowed'); return; } else {