Good point - I will add a comment. 
Short story: this is the commonly accepted solution to detect if the file is a folder. 


Von Samsung Mobile gesendet

-------- Ursprüngliche Nachricht --------
Von: icewind1991 <notifications@github.com> 
Datum:11.04.2014  17:45  (GMT+01:00) 
An: owncloud/core <core@noreply.github.com> 
Cc: Thomas Müller <thomas.mueller@tmit.eu> 
Betreff: Re: [core] Added the ability to Drag and Drop folders [chrome]   (#8104) 

In apps/files/js/file-upload.js:

> @@ -242,11 +242,18 @@ OC.Upload = {
>  						data.errorThrown = errorMessage;
>  					}
>  
> -					if (file.type === '' && file.size === 4096) {
> -						data.textStatus = 'dirorzero';
> -						data.errorThrown = t('files', 'Unable to upload {filename} as it is a directory or has 0 bytes',
> -							{filename: file.name}
> -						);
> +					// in case folder drag and drop is not supported file will point to a directory
> +					if (!file.type && file.size%4096 === 0 && file.size <= 102400) {
what is the point of the size checks?

—
Reply to this email directly or view it on GitHub.