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