• 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.

Item6124: MIME support for Office2007 format attachments

Item Form Data

AppliesTo: Component: Priority: CurrentState: WaitingFor: TargetRelease ReleasedIn
Engine   Normal Closed   n/a 4.2.4

Edit Form Data

Summary:
Reported By:
Codebase:
Applies To:
Component:
Priority:
Current State:
Waiting For:
Target Release:
Released In:
 

Detail

Office 2007 format files (.docx, .pptx, .xlsx) gets courrepted while downloading from TWiki implementation.

Following is exploration:

Attachment, say test.docx is attached at Sanbox on ExperiMent topic. Then the attachment can be download by following two methods:

[1]. use URL http://exampletwiki.com/twiki/pub/Sandbox/ExperiMent/test.docx  
[2]. use URL http://exampletwiki.com/twiki/bin/viewfile/Sandbox/ExperiMent?rev=;filename=test.docx
 

The method [1] can be fixed by adding following to Webserver configuration (e.g. httpd.conf in case of apache)

AddType application/vnd.ms-word.document.macroEnabled.12 .docm
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
AddType application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
AddType application/vnd.ms-powerpoint.template.macroEnabled.12 potm
AddType application/vnd.openxmlformats-officedocument.presentationml.template potx
AddType application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
AddType application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
AddType application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
AddType application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
AddType application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
AddType application/vnd.ms-excel.addin.macroEnabled.12 xlam
AddType application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
AddType application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
AddType application/vnd.ms-excel.template.macroEnabled.12 xltm
AddType application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
 

Method [2] is not fixed. In method the TWiki picks up MIME types from file defined in the variable <nop>$TWiki::cfg{MimeTypesFileName} which is generally set to TWIKI_ROOT/data/mime.types file.

After adding following section-browsers do recognize attachments as office2007 files but still generate errors while opening the files.

application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.ms-word.document.macroEnabled.12 .docm
application/vnd.openxmlformats-officedocument.wordprocessingml.document docx
application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx
application/vnd.ms-powerpoint.template.macroEnabled.12 potm
application/vnd.openxmlformats-officedocument.presentationml.template potx
application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam
application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm
application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx
application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm
application/vnd.openxmlformats-officedocument.presentationml.presentation pptx
application/vnd.ms-excel.addin.macroEnabled.12 xlam
application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb
application/vnd.ms-excel.sheet.macroEnabled.12 xlsm
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx
application/vnd.ms-excel.template.macroEnabled.12 xltm
application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx
 

Other observation is: I have done some experiments with LWP module,

my $url = ....
my $browser  = LWP::UserAgent->new();
my $response = $brv->get($url);
my $content  = $response->content();
print $content;
 

The above code produces the correct content (the correct docx file).

But experienced the issue in browsers like Firefox, IE (version 6), Chrome.

Method [2] has definitely a Bug for Office2007 MIME types.

-- TWiki:Main/SopanShewale - 13 Nov 2008

The recent code from trunk do not face this issue.

I have just updated the mime.types file to support .docx, .pptx etc suffixes -checkin the file into trunk.

Closing the Bug.

-- SopanShewale - 14 Nov 2008

Reopening the bug

  • Need to sort mime.types
  • Need to modify ".docm" to "docm" from mime.types file

and closing the Bug now

-- SopanShewale - 18 Nov 2008

ItemTemplate
Summary MIME support for Office2007 format attachments
ReportedBy TWiki:Main.SopanShewale
Codebase 4.1.2, 4.2.2, 4.2.3
SVN Range TWiki-5.0.0, Wed, 22 Oct 2008, build 17677
AppliesTo Engine
Component

Priority Normal
CurrentState Closed
WaitingFor

Checkins TWikirev:17726 TWikirev:17727 TWikirev:17728
TargetRelease n/a
ReleasedIn 4.2.4
Edit | Attach | Watch | Print version | History: r10 < r9 < r8 < r7 < r6 | Backlinks | Raw View |  Raw edit | More topic actions
Topic revision: r10 - 2008-11-18 - SopanShewale
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback