Revert "fix blocking drag & drop upload of folders"
Fixes #150
This reverts commit 5b2f3c7f72
.
This commit is contained in:
parent
250f40fe40
commit
e14054610f
|
@ -201,7 +201,7 @@ $(document).ready(function() {
|
||||||
var totalSize=0;
|
var totalSize=0;
|
||||||
if(files){
|
if(files){
|
||||||
for(var i=0;i<files.length;i++){
|
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'));
|
OC.dialogs.alert(t('files', 'Unable to upload your file as it is a directory or has 0 bytes'), t('files', 'Upload Error'));
|
||||||
return;
|
return;
|
||||||
|
@ -274,7 +274,7 @@ $(document).ready(function() {
|
||||||
var fileName = files[i].name
|
var fileName = files[i].name
|
||||||
var dropTarget = $(e.originalEvent.target).closest('tr');
|
var dropTarget = $(e.originalEvent.target).closest('tr');
|
||||||
if(dropTarget && dropTarget.attr('data-type') === 'dir') { // drag&drop upload to folder
|
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],
|
var jqXHR = $('.file_upload_start').fileupload('send', {files: files[i],
|
||||||
formData: function(form) {
|
formData: function(form) {
|
||||||
var formArray = form.serializeArray();
|
var formArray = form.serializeArray();
|
||||||
|
|
Loading…
Reference in New Issue