diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 3abcbf291ff653a8b1a55404ef3cc465c2629598..e17ffc48036d79d42bdd260fecd8f75c215235f5 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -165,12 +165,13 @@ if (isset($path)) {
 			$folder->assign('disableSharing', true);
 			$folder->assign('trash', false);
 			$tmpl->assign('folder', $folder->fetchPage());
-			$maxInputFileSize = OCP\Config::getSystemValue('maxZipInputSize', OCP\Util::computerFileSize('800 MB'));
 			$allowZip = OCP\Config::getSystemValue('allowZipDownload', true);
 			$tmpl->assign('allowZipDownload', intval($allowZip));
+			$tmpl->assign('showDownloadButton', intval($allowZip));
 			$tmpl->assign('downloadURL',
 				OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath));
 		} else {
+			$tmpl->assign('showDownloadButton', true);
 			$tmpl->assign('dir', $dir);
 
 			// Show file preview if viewer is available
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 12d72ca6d7790aec42cb236e611a52bc6f91e669..f3c75134a5fa77f25d4ba07286003487b958a7ce 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -15,10 +15,12 @@
 		                                                                                          src="<?php print_unescaped(image_path('', 'logo-wide.svg')); ?>" alt="<?php p($theme->getName()); ?>" /></a>
 		<div id="logo-claim" style="display:none;"><?php p($theme->getLogoClaim()); ?></div>
 		<div class="header-right">
+			<?php if ($_['showDownloadButton']): ?>
 			<a href="<?php p($_['downloadURL']); ?>" id="download" class="button">
 				<img class="svg" alt="" src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>"/>
 				<?php p($l->t('Download'))?>
 			</a>
+			<?php endif ?>
 		</div>
 </div></header>
 <div id="content">