summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/templates
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-06-09 21:44:54 +0200
committerLukas Reschke <lukas@owncloud.com>2016-06-09 21:44:54 +0200
commitc49402d26640df2adfdf3201cfc9c4c1456b7a66 (patch)
treecd3ad293efa5b267b75401ec6257a9490d1e4909 /apps/files_sharing/templates
parentc268ad15972e728dea0465f7332067a63c5bd678 (diff)
downloadnextcloud-server-c49402d26640df2adfdf3201cfc9c4c1456b7a66.tar.gz
nextcloud-server-c49402d26640df2adfdf3201cfc9c4c1456b7a66.zip
Add some error handling
Diffstat (limited to 'apps/files_sharing/templates')
-rw-r--r--apps/files_sharing/templates/public.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index ef9e4bfa574..35adb240022 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -41,6 +41,13 @@ OCP\Util::addscript('files', 'keyboardshortcuts');
<input type="hidden" name="mimetype" value="<?php p($_['mimetype']) ?>" id="mimetype">
<input type="hidden" name="previewSupported" value="<?php p($_['previewSupported'] ? 'true' : 'false'); ?>" id="previewSupported">
<input type="hidden" name="mimetypeIcon" value="<?php p(\OC::$server->getMimeTypeDetector()->mimeTypeIcon($_['mimetype'])); ?>" id="mimetypeIcon">
+<?php
+$upload_max_filesize = OC::$server->getIniWrapper()->getBytes('upload_max_filesize');
+$post_max_size = OC::$server->getIniWrapper()->getBytes('post_max_size');
+$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
+?>
+<input type="hidden" name="maxFilesizeUpload" value="<?php p($maxUploadFilesize); ?>" id="maxFilesizeUpload">
+
<?php if (!isset($_['hideFileList']) || (isset($_['hideFileList']) && $_['hideFileList'] === false)): ?>
<input type="hidden" name="filesize" value="<?php p($_['nonHumanFileSize']); ?>" id="filesize">
<?php endif; ?>