diff options
| author | ilotterytea <iltsu@alright.party> | 2025-06-02 01:59:00 +0400 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-06-02 01:59:00 +0400 |
| commit | 2f2b152860de21c12adebafc25a3b5d75cdf3853 (patch) | |
| tree | a874829ab1cb3ea8c2ffcd32ac191610700690e6 /public/index.php | |
| parent | 352ad8ee0ec3ecb676eda574331f8674e93f391d (diff) | |
feat: info for file uploader software
Diffstat (limited to 'public/index.php')
| -rw-r--r-- | public/index.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/public/index.php b/public/index.php index ef41ae6..9da069d 100644 --- a/public/index.php +++ b/public/index.php @@ -77,7 +77,14 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/../lib/partials.php'; </div> </div> <?php endif; ?> - <p class="font-small">Max file size: <b><?= get_cfg_var('upload_max_filesize') ?></b></p> + <ul class="row gap-8 font-small" style="list-style:none"> + <li> + <p class="font-small">Max file size: + <b><?= get_cfg_var(option: 'upload_max_filesize') ?></b></p> + </li> + <li><a href="/uploaders.php#supported-file-extensions" target="_blank">Supported file + extensions</a></li> + </ul> </div> <div class="column" id="form-text-upload"> @@ -262,6 +269,11 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/../lib/partials.php'; } function addUploadedFile(file) { + let file_url = `/${file.id}.${file.extension}`; + if (file.urls && file.urls.download_url) { + file_url = file.urls.download_url; + } + return ` <div class="box item column gap-4 pad-4"> <?php if (FILE_THUMBNAILS): ?> @@ -277,7 +289,7 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/../lib/partials.php'; <p title="${file.size} B">${(file.size / 1024 / 1024).toFixed(2)} MB</p> </div> <div class="row gap-8"> - <a href="/${file.id}.${file.extension}"> + <a href="${file_url}"> <button>Open</button> </a> </div> |
