summaryrefslogtreecommitdiffstats
path: root/static/js
diff options
context:
space:
mode:
Diffstat (limited to 'static/js')
-rw-r--r--static/js/upload.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/static/js/upload.js b/static/js/upload.js
index 26b2117..a8a0e5a 100644
--- a/static/js/upload.js
+++ b/static/js/upload.js
@@ -38,7 +38,10 @@ $(function () {
var resJson = JSON.parse(xhr.responseText);
status(resJson.file + ' done, choose a file');
setTimer();
- window.open('./uploads/' + resJson.savedAs, 'upload', 'status=1, height = 300, width = 300, resizable = 0');
+ if (resJson.image)
+ window.open('./uploads/' + resJson.savedAs, 'upload', 'status=1, height = 300, width = 300, resizable = 0');
+ else
+ console.log('not an image');
};
xhr.send(formData);
return false; // no refresh