diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index fb18bc26248..96fe12fc86a 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -151,6 +151,9 @@ if (isset($path)) { if (\OCP\App::isEnabled('files_encryption')) { $allowPublicUploadEnabled = false; } + if (isset($file)) { + $allowPublicUploadEnabled = false; + } $tmpl->assign('allowPublicUploadEnabled', $allowPublicUploadEnabled); $tmpl->assign('uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize)); diff --git a/core/js/share.js b/core/js/share.js index 9494637c3dc..21e352ee1c6 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -181,13 +181,13 @@ OC.Share={ html += '
'; html += ''; html += '
'; - if (possiblePermissions & OC.PERMISSION_CREATE) { + if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE)) { html += ''; } - html += '';