diff options
author | Brice Maron <brice@bmaron.net> | 2012-05-24 18:47:05 +0000 |
---|---|---|
committer | Brice Maron <brice@bmaron.net> | 2012-05-24 18:47:34 +0000 |
commit | 2c9311cf48baa7bdfe4eae5892017fb0c72ff24f (patch) | |
tree | c6a8d7c3726c0ad91a174da9dfbab04587aa13a1 /apps/files | |
parent | a1539dace78207076edc4ea42619e9a81dd41fe2 (diff) | |
download | nextcloud-server-2c9311cf48baa7bdfe4eae5892017fb0c72ff24f.tar.gz nextcloud-server-2c9311cf48baa7bdfe4eae5892017fb0c72ff24f.zip |
Add error message when uploading folder or null files. ref oc-739
Diffstat (limited to 'apps/files')
-rw-r--r-- | apps/files/js/files.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index ae6f7ada66d..12a986d9f9d 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -194,6 +194,11 @@ $(document).ready(function() { var totalSize=0; if(files){ for(var i=0;i<files.length;i++){ + if(files[i].size ==0 && files[i].type== '') + { + OC.dialogs.alert('Unable to upload your file as it is a directory or has 0 bytes','Upload Error'); + return; + } totalSize+=files[i].size; if(FileList.deleteFiles && FileList.deleteFiles.indexOf(files[i].name)!=-1){//finish delete if we are uploading a deleted file FileList.finishDelete(function(){ |