DownloadManager-Talk

Summary: Talk page for DownloadManager.
Maintainer:
Users: (View / Edit)

This space is for User-contributed commentary and notes. Please include your name and a date along with your comment.

Comments

Summary page for downloads

A summary page for all downloads is now possible with TotalCounter. Micha April 25, 2007, 01:37 PM

Integration of "Attach:" markup?

I have just installed the recipe, and it seems that only attachments with the "Download:" markup are counted. Is it possible to configure the script so that the existing (thousands of) attachments using the "Attach:" markup are counted, too? I'd prefer 'silent' counting without display because the layout of existing pages might be affected. --Henning June 06, 2006, at 08:11 AM

adding the following code in config.php before you include downloadman.php allows files using Attach: get logged through DownloadManager as well. note that in adding this, Download: still gets logged:
         SDV($IMap['Attach:'], '$1');
         SDV($LinkFunctions['Attach:'], 'LinkDownloadManager');
overtones99 July 18, 2008, at 09:58 PM
actually, after some experimentation, i found that the above method only sort-of works -- yes, Attach: does act now like Download:, however the tradeoff is that images don't show up on the page anymore - instead they're just links: Attach:mypic.jpg (!!) overtones99 July 19, 2008, at 06:51 AM

DownloadList?

Is there a way to modify the (:attachlist:) directive to give a quick list all the attached files using the DownloadMan style? Paul October 16, 2006, at 02:39 PM

Problem with filenames that have spaces

As currently coded, [[Download:My File With Spaces.pdf]] when clicked upon results in the correct file being downloaded, but the file itself is named "My" -- everything after the first space has been dropped! DownloadManager is opening the file by calling an fopen command; I discovered that if you instead substitute a Redirect() command, you get the file you want, with the title you want. Below is both the code that I commented out and added:

   /*	// Fix for Internet Explorer 6.0 or prior bug.
	header('Cache-Control: maxage=3600'); //Adjust maxage appropriately
	header('Pragma: public'); 

	//echo "filepath: $filepath";

	preg_match('/\\.([^.]+)$/',$filepath,$match);
	if ($UploadExts[@$match[1]]) 
		header("Content-Type: {$UploadExts[@$match[1]]}");
	header("Content-Length: ".filesize($filepath));
	header("Content-disposition: $DownloadDisposition; filename=$upname");
	$fp = fopen($filepath, "r");

	if ($fp) {
		while (!feof($fp)) echo fread($fp, 4096);
		fclose($fp);
	}
	umask($oldumask);

	exit();
     */		
	//Redirect($pagename, "$filepath");
	Redirect($pagename, "$PmWikiDir/$filepath");
        ## $PmWikiDir is basically: http://mysite.com/pmwiki -- $filepath contains 'uploads/$Group/$upname'
        ## be sure to include $PmWikiDir in your globals at the top of the function
overtones99 July 19, 2008, at 06:51 AM

Talk page for the DownloadManager recipe (users).

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_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=Cookbook%2fDownloadManager%2dTalk
            [REDIRECT_HTTPS] => on
            [REDIRECT_QUERY_STRING] => n=Cookbook%2fDownloadManager%2dTalk
            [REDIRECT_SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/DownloadManager-Talk
            [REDIRECT_SCRIPT_URL] => /wiki/Cookbook/DownloadManager-Talk
            [REDIRECT_SSL_TLS_SNI] => www.pmwiki.org
            [REDIRECT_STATUS] => 200
            [REDIRECT_UNIQUE_ID] => afQ4QV6gRt9O8ieRe3HUOgAAAJY
            [REDIRECT_URL] => /wiki/Cookbook/DownloadManager-Talk
            [REMOTE_ADDR] => 216.73.216.25
            [REMOTE_PORT] => 9053
            [REQUEST_METHOD] => GET
            [REQUEST_SCHEME] => https
            [REQUEST_URI] => /wiki/Cookbook/DownloadManager-Talk
            [SCRIPT_FILENAME] => /home/pmwiki/public_html/index.php
            [SCRIPT_NAME] => /index.php
            [SCRIPT_URI] => https://www.pmwiki.org/wiki/Cookbook/DownloadManager-Talk
            [SCRIPT_URL] => /wiki/Cookbook/DownloadManager-Talk
            [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] => afQ4QV6gRt9O8ieRe3HUOgAAAJY
            [PHP_SELF] => /index.php
            [REQUEST_TIME_FLOAT] => 1777612866.0254
            [REQUEST_TIME] => 1777612866
            [argv] => Array
                (
                    [0] => n=Cookbook%2fDownloadManager%2dTalk
                )

            [argc] => 1
        )

)