Question
- I have attached a html page to a topic (*.html).
- I expect that the attachment is opened in the browser when I click the created link but only the html code of the attachment is shown.
- If I directly click the attachment link at the bottom of the topic it is opened correctly.
- I have looked to the configure script. The filter for html and htm is set but despite of this the files are not renamed to *.html.txt. I have looked in the folder.
- I have tried a much simpler html file and it works fine within Internet Explorer but not in Firefox.
- %INCLUDE% works fine but that is not what I really want because I only want a link to the attached html file.
- Do you know what I can do in order to open a html page correctly when I just click the link and not the attachment itself?
Environment
--
KirstinWeber - 29 May 2007
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
The links in the attachment table go through the
viewfile
script - this is probably messing up the file type. We recently have changed these links to 'plain' pub urls - that is scheduled for TWiki 4.2.
In the meantime, are you able to edit the file
templates/attachtable.pattern.tmpl
? In that file, change
%A_URL%
to
<a href="%PUBURL%/%WEB%/%TOPIC%/%A_FILE%">%A_FILE%</a>
.
--
ArthurClemens - 29 May 2007
Check also the
{MimeTypesFileName}
in configure, it should point to a valid and readable mime types files.
--
PeterThoeny - 29 May 2007
What is the result of
%A_FILE%? At the moment, one link shows the pure code the other the correct page. Will I get the code or the correct page?
--
KirstinWeber - 31 May 2007
Sorry, I wanted to write
<a href="%PUBURL%/%WEB%/%TOPIC%/%A_FILE%">%A_FILE%</a>
--
KirstinWeber - 31 May 2007