• Do not register here on develop.twiki.org, login with your twiki.org account.
• Use View topic Item7848 for generic doc work for TWiki-6.1.1. Use View topic Item7851 for doc work on extensions that are not part of a release. More... Close
• Anything you create or change in standard webs (Main, TWiki, Sandbox etc) will be automatically reverted on every SVN update.
Does this site look broken?. Use the LitterTray web for test cases.

When attaching openoffice 2.0 documents they get uploaded with the correct extension like odt. But when you download them they get a .txt extension. I read somewhere, that this is for security. It would also be nice to have some icons for the documents, but I could not find any except on their startpage.

Mimetypes for opendocument: http://framework.openoffice.org/documentation/mimetypes/mimetypes.html

Sorry, can't reproduce this.

Please add a testcase, or just create a topic with a file of the mentioned type in the Sandbox here or similar, so we can see what is going on - and the re-open this.

I believe this may have to do with your local browser setup - do you get the same behaviour with Firefox / IE / wget?

$cfg{UploadFilter} in TWiki.cfg lists files that'll get the .txt part appended pr. default - but odt is not among these in a standard configuration.

-- SP

Ok, thanks. I now discovered, that this is only true when using Safari frown Firefox works well with openoffice attachments...

-- AU

I think the problem is the mimetype send by TWiki. On other systems it works, they provide application/x-zip as mimetype. TWiki provide text/plain and Safari will append .txt to the download.

Test with attached file:

HTTP/1.1 200 OK
Date: Tue, 31 Jan 2006 10:30:56 GMT
Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_jk/1.2.0 mod_perl/1.26 mod_ssl/2.8.12 OpenSSL/0.9.6b
content-disposition: inline;filename=test.odt
content-length: 5699
Connection: close
Content-Type: text/plain; charset=ISO-8859-1

-- AU

On first glance I had thought this was similar to item1549 - but for the extension .odt there's simply no entry in TWiki's data/mime.types file, therefore it gets mapped to the default of text/plain. If application/x-zip is the correct openoffice MIME type, then appending one line to data/mime.types should do:

application/x-zip odt

-- TWiki:Main.HaraldJoerg

It seems to be more complicated than that. I added the mimetypes, and yes they will be devlivered correctly after that. And even when you click on the attachment it will download it without appending txt to it. But when you click "download linked file" it will append it again.

In my opinion the cause is Content-disposition: inline;filename=MailingWeihnachtskarte.ods . Other systems will not deliver such a string within the http header. If we could get rid of that I guess it will work.

-- AU

Took the opportunity to register the whole openoffice.org filename extension list to mime.types.

SVN 8622.

-- SP

With Content-disposition: attachment;filename=filename.ods it finally works correct with Safari.

SVN 8623

-- AU

AU, you should be aware that changing this to attachment just creates a problem on other browsers, see i.e. http://support.microsoft.com/default.aspx/kb/262042 or http://support.microsoft.com/default.aspx/kb/279667.

(Besides, this is of course also changing download behaviour on the browsers that work, forcing all files to trigger a "Save As" dialogue - meaning e.g. .txt-files or .html-files can no long just show in the browser pr. default (left-click)).

-- SP

Ja, IE and Safari works but Firefox gets problems. Maybe it is a bug for Safari smile

reverted the change SVN 8624

-- AU

I think some sites actually offer different content-disposition strings for downloads, dependent on which browser is visiting them.

-- SP

Summary Set mimetype for attachments (was: Support for openoffice documents)
ReportedBy TWiki:Main.AndreUlrich

SVN Range Sun, 29 Jan 2006 build 8586
AppliesTo Engine

Priority Normal
CurrentState Closed

Checkins 8622 8623 8624
Topic attachments
I Attachment History Action Size Date Who Comment
Unknown file formatodt test.odt r1 manage 5.6 K 2006-01-31 - 10:29 AndreUlrich  
Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r13 - 2006-01-31 - SteffenPoulsen
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback