From 001daa60f1741c8df4dac9a520006d9cb443e12a Mon Sep 17 00:00:00 2001 From: Jon Jenkins Date: Sun, 6 Apr 2014 08:42:25 -0600 Subject: added easyimage for thunbnails --- static/js/upload.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'static') 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 -- cgit v1.2.3