00771: $UploadSuffixFmt (to work like $UploadPrefixFmt)

Summary: $UploadSuffixFmt (to work like $UploadPrefixFmt)
Created: 2006-07-05 09:15
Status: Awaiting comments
Category: Feature
From: Henning
Assigned:
Priority: 44
Version: 2.1.7
OS: XP/Apache 2

Description: I'd like to suggest the addition of a variable

  • $UploadSuffixFmt

that works just like $UploadPrefixFmt except that it does not precede the path name but the file name itself instead.

The benefit: In an application where files are stored in a systematical manner per page (typically using WikiForms), it would be possible to relieve the user from having to think of a unique file name "manually". (The benefit is reaped when downloading and re-using the files.)

Exmaple:

  • $UploadSuffixFmt='$Name-'
  • Markup: Attach:Report.doc on page "0001" in group "Reports"
  • Qualified file name: /uploaddir/Reports/0001-Report.doc

Since I'm using the WikiForms recipe for different applications and the "unique file name" generation problem applies to them all, I guess this is sort of a universally useful mechanism.

--Henning July 05, 2006, at 09:21 AM

Array
(
    [post_max_size] => 64M
    [$_POST keys] => 
    [$_REQUEST keys] => n
    [$_SERVER] => Array
        (
            [CONTEXT_DOCUMENT_ROOT] => /home/pmwiki/public_html
            [CONTEXT_PREFIX] => 
            [DOCUMENT_ROOT] => /home/pmwiki/public_html
            [GATEWAY_INTERFACE] => CGI/1.1
            [HTTPS] => on
            [HTTP_ACCEPT] => */*
            [HTTP_ACCEPT_ENCODING] => gzip, br, zstd, deflate
            [HTTP_COOKIE] => imstime=1777539833; PHPSESSID=bumsdrgslopur5ds5d462hqph7
            [HTTP_HOST] => www.pmwiki.org
            [HTTP_USER_AGENT] => Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
            [HTTP_X_HTTPS] => 1
            [PATH] => /bin:/usr/bin
            [PHP_INI_SCAN_DIR] => /opt/cpanel/ea-php70/root/etc:/opt/cpanel/ea-php70/root/etc/php.d:.
            [QUERY_STRING] => n=PITS%2f00771
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=PITS%2f00771
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/PITS/00771
            [REDIRECT_SCRIPT_URL] => /wiki/PITS/00771
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afMbDynIPg-Hs_ShsG5U5wAAABg
            [REDIRECT_URL] => /wiki/PITS/00771
            [REMOTE_ADDR] => 216.73.216.25
            [REMOTE_PORT] => 47318
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/PITS/00771
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/PITS/00771
            [SCRIPT_URL] => /wiki/PITS/00771
            [SERVER_ADDR] => 23.254.203.248
            [SERVER_ADMIN] => webmaster@pmwiki.org
            [SERVER_NAME] => www.pmwiki.org
            [SERVER_PORT] => 443
            [SERVER_PROTOCOL] => HTTP/1.1
            [SERVER_SIGNATURE] => 
            [SERVER_SOFTWARE] => Apache
            [SSL_TLS_SNI] => www.pmwiki.org
            [TZ] => America/Los_Angeles
            [UNIQUE_ID] => afMbDynIPg-Hs_ShsG5U5wAAABg
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777539855.2617
            [REQUEST_TIME] => 1777539855
            [argv] => Array
                (
                    [0] => n=PITS%2f00771
                )

            [argc] => 1
        )

)