diff options
author | Jon Jenkins <jondjenkins@gmail.com> | 2014-04-06 08:42:25 -0600 |
---|---|---|
committer | Jon Jenkins <jondjenkins@gmail.com> | 2014-04-06 08:42:25 -0600 |
commit | 001daa60f1741c8df4dac9a520006d9cb443e12a (patch) | |
tree | 310cdcde997c421d73414efd4875baeb89b40c0f /static | |
parent | 555680e9eaac75de3660464075a40e8294e1a8f2 (diff) | |
download | express-upload-001daa60f1741c8df4dac9a520006d9cb443e12a.tar.gz express-upload-001daa60f1741c8df4dac9a520006d9cb443e12a.tar.bz2 express-upload-001daa60f1741c8df4dac9a520006d9cb443e12a.zip |
added easyimage for thunbnails
Diffstat (limited to 'static')
-rw-r--r-- | static/js/upload.js | 5 |
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 |