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:44:31 -0600 |
commit | 1cb1dade78823c790813a0f2e40237b22da12a23 (patch) | |
tree | 310cdcde997c421d73414efd4875baeb89b40c0f /static | |
parent | 555680e9eaac75de3660464075a40e8294e1a8f2 (diff) | |
download | express-upload-1cb1dade78823c790813a0f2e40237b22da12a23.tar.gz express-upload-1cb1dade78823c790813a0f2e40237b22da12a23.tar.bz2 express-upload-1cb1dade78823c790813a0f2e40237b22da12a23.zip |
added easyimage for thumbnails
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 |