diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-12 15:30:16 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-12 15:30:16 +0200 |
commit | 5b2f3c7f72a002b38da31a6748c0de22cb335203 (patch) | |
tree | 098b96695a3f73cb1be8c7c7753f43799e739be5 /apps | |
parent | c099545b6d15e211742c5af61617d798d0a22aa5 (diff) | |
download | nextcloud-server-5b2f3c7f72a002b38da31a6748c0de22cb335203.tar.gz nextcloud-server-5b2f3c7f72a002b38da31a6748c0de22cb335203.zip |
fix blocking drag & drop upload of folders
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/files.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files/js/files.js b/apps/files/js/files.js index 64919acb5dd..c5333f2fafb 100644 --- a/apps/files/js/files.js +++ b/apps/files/js/files.js @@ -209,7 +209,7 @@ $(document).ready(function() { var totalSize=0; if(files){ for(var i=0;i<files.length;i++){ - if(files[i].size ==0 && files[i].type== '') + if(files[i].size ==0 || files[i].type== '') { OC.dialogs.alert(t('files', 'Unable to upload your file as it is a directory or has 0 bytes'), t('files', 'Upload Error')); return; @@ -282,7 +282,7 @@ $(document).ready(function() { var fileName = files[i].name var dropTarget = $(e.originalEvent.target).closest('tr'); if(dropTarget && dropTarget.attr('data-type') === 'dir') { // drag&drop upload to folder - var dirName = dropTarget.attr('data-file') + var dirName = dropTarget.attr('data-file'); var jqXHR = $('.file_upload_start').fileupload('send', {files: files[i], formData: function(form) { var formArray = form.serializeArray(); |