[pmwiki-devel] EnableDirectDownload
Petko Yotov
5ko at 5ko.fr
Mon Dec 1 00:05:53 PST 2025
Indeed, there is:
# Attach:file.jpg
$url = DownloadUrl($pagename, "file.jpg");
# Attach:Main.HomePage/file.jpg
$url = DownloadUrl($pagename, "Main.HomePage/file.jpg");
This function sets some other useful variables about the file in the
global $FmtV which you can read immediately after the call, see
upload.php.
Petko
--
If you upgrade : https://www.pmwiki.org/Upgrades
On 01/12/2025 08:52, Simon wrote:
> Is there a variable or helper for this
>
> if (empty($EnableDirectDownload)) {
> $url = PHSC("$ScriptUrl?n=$$fileNameFull&action=download"); # Direct
> download disabled, route through pmwiki.php
> } else {
> $url = PHSC("$UploadUrlFmt/$fileNameFull"); #Direct download enabled
> }
>
More information about the pmwiki-devel
mailing list