Tags:
create new tag
, view all tags

Bug: Browser shows "Save as" dialogs when viewing attached files

The viewfile script returns a hard-coded MIME file type of text/plain (for .txt) or application (for anything else). The problem with that is that attached images can't be viewed in the browser and that other files can't be opened with browser helper applications that depend on the MIME types.

Test case

  • Click on a GIF file in the file attachment table

Fix

TWiki is now aware of the Apache mime.types file, which translates the file suffix to the MIME type. The $mimeTypesFilename in TWiki.cfg can be set to the path name of Apache's mime.types file. TWiki releases will have it set to a TWiki internal "$dataDir/mime.types" file so that TWiki works OK out of the box.

The TWikiAlphaRelease has been updated. In case you want to upgrade your installation before the next Beta release copy the attached mime.types file into your twiki/data directory.

Environment

TWiki version: 03 Aug 2001 (and older ones with AttachmentsUnderRevisionControl
TWiki plugins: N/A
Server OS: N/A
Web server: N/A
Perl version: 5.0
Client OS: N/A
Web Browser: N/A

-- PeterThoeny - 12 Aug 2001

Related topics: AttachmentsUnderRevisionControl, IncorrectAttachmentsRevForOlderTopicRevs

-- PeterThoeny - 12 Aug 2001

Topic attachments
I Attachment Action Size Date Who Comment
Unknown file formattypes mime.types manage 3.4 K 2001-08-13 - 06:50 UnknownUser Default MIME file
Topic revision: r1 - 2001-08-13 - PeterThoeny
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.