[pmwiki-users] Possible Problem with Restricting File Download . . .

Patrick R. Michaud pmichaud at pobox.com
Tue Jul 19 16:38:36 CDT 2005


On Mon, Jul 18, 2005 at 11:53:45PM -0500, Benjamin Wilson wrote:
> /index.php?n=Group.Page?action=download&upname=file.doc
> 
> The above is an example of a URL output by PmWiki when limiting direct 
> downloads. The problem is that when I go to save the file in Firefox, it 
> wants to save the pages as "index.php". This presents an obvious problem 
>  as the filename should be saved as "file.doc".
> 
> Has anybody found and resolved this problem?

The problem is that PmWiki needs to send a Content-Disposition:
header to tell the browser the correct filename to use for the download.
Unfortunately, the Content-Disposition header also requires a designation
of either "inline" or "attachment", and there's not a convenient
rule to say when to use each.

That said, I think I'm going to set this up to default to "inline",
and leave it as a configuration parameter so that the wikiadmin
can adjust it as appropriate.  In fact, I just tried this setting
on pmwiki.org and it seems to work out just fine.

Now implemented in 2.0.beta49 -- just released.

Pm




More information about the pmwiki-users mailing list