diff options
Diffstat (limited to 'apps/files/js/files.js')
-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(){ |