-----Oorspronkelijk bericht-----
Van: Michiel Meeuwissen [mailto:[EMAIL PROTECTED]
Verzonden: woensdag 16 juli 2003 13:12
Aan: [EMAIL PROTECTED]
Onderwerp: Re: Attachment questionSandra Hibma <[EMAIL PROTECTED]> wrote:
> In MMBase I upload, for example, a PDF file, using the attachments builder. The mimetype is recognised as PDF and the file is stored in the database. So far so good. Now, in my template I use the tag <mm:attachment /> (producing attachment.db?1053) to retrieve a link to my stored PDF-file. If I click this link it does not open Adobe Acrobat, but asks if I want to download or open the file (In Internet Explorer). It does not recognise my file as a PDF.> What can I do to make sure that my attachment opens in the right programm(, using its mimetype).
> (I've tried this with different browsers, results are the same)
As far as I know, the mime-type (and content-disposition) should be honoured by the browsers. But
possibly, IE mainly looks at filename to determin what it should do.Perhaps it will help to generate url's with filename that will be recognized by IE.
IIRC this will happen automaticly by the <mm:attachment /> tag if you map the attachmentservlet to
something which can contain a file-name in web.xml.
[Sandra Hibma] I've tried changing the web.xml to:Consicely, please check if it goes better if you change the concerning lines in web.xml to this:
<servlet-mapping>
<servlet-name>attachments</servlet-name>
<url-pattern>/attachments/*</url-pattern>
</servlet-mapping>
[Sandra Hibma] but the url it generates is: /attachments/1053 and it still asks for downloading. Even If I type the url: /attachments/whatever.pdf?1053 it still does not open Adobe, but wants to download. Is there anything else I can try?PS. the mime-type is application/pdf
It will then (hopefully) generate links like /attachments/sometitleofattachment.pdf?1053
which will work accactly the same, though will help some browsers.
MIchiel
--
Michiel Meeuwissen
Mediapark C101 Hilversum
+31 (0)35 6772979
nl_NL, eo, en_US
mihxil'
[]()
Title: Re: Attachment question
- Attachment question Sandra Hibma
- Re: Attachment question Michiel Meeuwissen
- FW: Attachment question Pierre van Rooden
- Re: Attachment question Sandra Hibma
- Re: Attachment question Michiel Meeuwissen
- Re: Attachment question Michiel Meeuwissen
- RE: FW: Attachment question Bart Lute/SVDT
- RE: FW: Attachment question Pierre van Rooden
- Re: FW: Attachment question Michiel Meeuwissen
- Re: FW: Attachment question S.A. de Heer
