Fix public upload case
Merge pull request #1852 from owncloud/stable5-fix-public-upload

[stable5] Fix public upload case