« Previous -
Version 6/38
(diff) -
Next » -
Current version
Peter Klein, 2009-09-14 19:23
PMK Forced Download¶
Example of usage as extended stdWrap parameter (Requires TYPO3 v4.2+):¶
10 = TEXT 10.value = download 10.typolink.parameter = fileadmin/templates/images/dwarf_male120x.gif 10.typolink.parameter.forceDownload = 1
Example of usage as userFunction:¶
10 = TEXT 10.value = download 10.typolink.parameter = fileadmin/templates/images/dwarf_male120x.gif 10.typolink.parameter.postUserFunc = tx_pmkfdl_makedownloadlink->makeDownloadLink
This link will open up a requester in the browser, asking the user what he wants to do with the file (Save, Open etc.)
If the typolink points to a valid file, then the link will be modified to something like this:
http://www.mydomain.com/index.php?eID=pmkfdl&file=fileadmin%2Ftemplates%2Fimages%2Fdwarf_male120x.gif&ck=a94fad5a0262b2e00e1aa72e8aac4c30
A MD5 checksum is added as a 2nd parameter to insure that it is the correct file that is being downloaded.
(If the MD5 checksum doesn't match the file, then the download will be terminated.)
If you want to force a download, without opening up the browser requester, you can add a special option/parameter called "forcedl"
Example of usage as extended stdWrap parameter, with "forcedl" set (Requires TYPO3 v4.2+):¶
10 = TEXT 10.value = download 10.typolink.parameter = fileadmin/templates/images/dwarf_male120x.gif 10.typolink.parameter.forceDownload = forcedl
Example of usage as userFunction, with "forcedl" set:¶
10 = TEXT 10.value = download 10.typolink.parameter = fileadmin/templates/images/dwarf_male120x.gif 10.typolink.parameter.postUserFunc = tx_pmkfdl_makedownloadlink->makeDownloadLink 10.typolink.parameter.postUserFunc.forceDownload = forcedl