Tags:
create new tag
view all tags

Bug: Viewfile Script Uses Topic Name Instead of File Name

There's a bug with the TWiki/bin/viewfile script in the current distribution. This module will always change the name of the download filename to the name of the topic unless you retrieve the latest version. The reason this occurs is as follows: If the requested version is the latest version, viewfile redirects the CGI to download the latest copy on the server. Otherwise it manually builds a download stream of the file from rcs. When it builds the download stream from rcs, it doesn't include a Content-Disposition: tag, which is how you specify what the download filename is. I fixed viewfile on my site to do this. If you want this fix (also fixes the same problem from the Attachment screen), use viewfile.zip

Environment

TWiki version:  
TWiki plugins:  
Server OS:  
Web server:  
Perl version:  
Client OS:  
Web Browser:  

-- EdLott - 08 Dec 2001

Cloned this topic from Plugins.VersionLinkPluginDev since it should be fixed in the TWiki core code.

-- PeterThoeny - 10 Dec 2001

Fix record

Thanks for the patch! This is now in the TWikiAlphaRelease in slightly simplified form. Tested on a local TWiki and works OK.

-- RichardDonkin - 22 Mar 2002


Category: TWikiPatches
Topic attachments
I Attachment History Action Size Date Who Comment
Compressed Zip archivezip viewfile.zip r1 manage 1.7 K 2001-12-11 - 06:47 UnknownUser viewfile fix
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r5 - 2002-03-23 - RichardDonkin
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.