diff --git a/apps/files/index.php b/apps/files/index.php index 2338cf439e..892f75a351 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -138,5 +138,6 @@ if ($needUpgrade) { $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); $tmpl->assign('usedSpacePercent', (int)$storageInfo['relative']); $tmpl->assign('isPublic', false); + $tmpl->assign('publicUploadEnabled', \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes')); $tmpl->printPage(); } diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index 7d679bc4bf..dacd2be0b3 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -61,7 +61,7 @@
t('Nothing in here. Upload something!'))?>
- +
+ + +
diff --git a/core/js/share.js b/core/js/share.js index 21e352ee1c..4c8fd87410 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -161,7 +161,12 @@ OC.Share={ // respective checkbox should be checked or // not. + var publicUploadEnabled = $('#filestable').data('allow-public-upload'); + if (typeof publicUploadEnabled == 'undefined') { + publicUploadEnabled = 'no'; + } var allowPublicUploadStatus = false; + $.each(data.shares, function(key, value) { if (allowPublicUploadStatus) { return true; @@ -181,7 +186,7 @@ OC.Share={ html += '
'; html += ''; html += '
'; - if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE)) { + if (itemType === 'folder' && (possiblePermissions & OC.PERMISSION_CREATE) && publicUploadEnabled === 'yes') { html += '
> /> + value="1" />
t('Allow users to share items to the public with links')); ?>
> + /> +
+ t('Allow users to enable others to anonymously upload into their publicly shared folders')); ?> +
>