Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Uploading of 0 bytes files is not possible. #19116
Steps to reproduce
File is uploaded.
File is not uploaded because it has 0 bytes.
ownCloud version: (see ownCloud admin page)
Updated from an older ownCloud or fresh install:
List of activated apps:
The content of config/config.php:
Are you using external storage, if yes which one: local/smb/sftp/...
Are you using encryption:
@oparoz what browser?
I have seen that after some time, it works. (today it works, yesterday it didn't in the same server same browser).
I guess it is a problem with new users uploading 0 bytes files.
I tested this on a mac. But I've tested it again and found that the problem is the file not the OS.
Another thing I've seen is that changing the extension in linux doesn't make the behaviour change. But in mac it does. When uploading a file which was a .log file from linux it fails and refresh automatically the web ui.
Once upon a time an eager developer added a feature to make it possible to upload folders in Chromium. However as this feature doesn't work in other browsers, a check was put in that tries to detect when people try uploading folders with such browsers. Unfortunately the way how the check is implemented would also filter out zero-byte files that have no mime type !
Now the problem is that if we modify this check to allow empty files again, we'll also lose the error message in case of folder upload with unsupported browsers. I checked the File object from such upload and there is no accurate way of detecting a failed folder upload, it simply appears like an empty file...
So let's remove the error message and allow uploading empty files again.
I just did some testing and in Firefox when uploading a directory,