Issue 117271 - more choices of content type in BugZilla
Summary: more choices of content type in BugZilla
Status: CLOSED FIXED_WITHOUT_CODE
Alias: None
Product: Infrastructure
Classification: Infrastructure
Component: Bugzilla (show other issues)
Version: current
Hardware: All All
: P3 Normal (vote)
Target Milestone: ---
Assignee: bernd.eilers
QA Contact: issues@www
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-08 02:21 UTC by tora3
Modified: 2016-04-07 08:41 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
a shell script to print file types that OOo offers (1.27 KB, text/plain)
2011-03-09 15:46 UTC, tora3
no flags Details
file types that OOo offers (9.51 KB, text/plain)
2011-03-09 15:49 UTC, tora3
no flags Details
Bugzilla Content Type template (5.46 KB, text/plain)
2011-03-10 07:54 UTC, bernd.eilers
no flags Details
testing new server side autodetect with odt (16.09 KB, application/vnd.oasis.opendocument.text)
2011-03-23 09:02 UTC, bernd.eilers
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description tora3 2011-03-08 02:21:04 UTC
When we try to attach a file to an issue on Bugzilla, there are four choices
of content type, or MIME type, media type:

Content Type:
 If the attachment is a patch, check the box below.
   [ ] patch --- (1)

 Otherwise, choose a method for determining the content type.
   (x) auto-detect --------- (2)
   ( ) select from list: --- (3)
   ( ) enter manually: ----- (4)

How accurately does auto-detect (2) work?
Does it properly distinguish an internal application type of both ODF and OOXML from ZIP?

The list (3) offers solely seven choices:
  plain text (text/plain)
  HTML source (text/html)
  XML source (application/xml)
  GIF image (image/gif)
  JPEG image (image/jpeg)
  PNG image (image/png)
  binary file (application/octet-stream)

Could you consider adding more choices for OOo 1.x, ODF, OOXML, PDF, things like that?
Comment 2 tora3 2011-03-08 09:19:31 UTC
FYI: a bug in the following handmade tool has been fixed:
 An implementation for OOo 1.x, ODF and OOXML as well as normal file formats
 https://bitbucket.org/tora/tools/src/tip/mime-detection/file+/
Comment 3 bernd.eilers 2011-03-08 21:01:34 UTC
confirmed
Comment 4 bernd.eilers 2011-03-08 21:11:15 UTC
bei->tora: I started by adding the ODF and old OpenOffice.org 1.0 mime types and pdf
Do you have a mapping available from Microsoft's mime types and extensions to user readable titles for these formats?
Comment 5 tora3 2011-03-09 15:46:54 UTC
Created attachment 76061 [details]
a shell script to print file types that OOo offers
Comment 6 tora3 2011-03-09 15:49:17 UTC
Created attachment 76062 [details]
file types that OOo offers
Comment 7 tora3 2011-03-09 16:22:19 UTC
tora->bei: just one of the ideas: 

Idea from the file types attached:
Microsoft Excel 95/97/2000/XP/2003 (.xls .xlt .xlc .xlm .xlw)	application/vnd.ms-excel
Microsoft PowerPoint 95/97/2000/XP/2003 (.ppt .pot .pps)	application/vnd.ms-powerpoint
Microsoft Word 95/97/2000/XP/2003 (.doc .dot)	application/msword

Idea from http://technet.microsoft.com/en-us/library/ee309278(office.12).aspx
Microsoft Office Excel 2007 (.xlsx .xlam .xlsb .xltm .xlsm .xltx)	application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Microsoft Office PowerPoint 2007 (.pptx .ppam .pptm .potm .ppsm .sldm .ppsx .sldx .potx)	application/vnd.openxmlformats-officedocument.presentationml.presentation
Microsoft Office Word 2007 (.docx .docm .dotm .dotx)	application/vnd.openxmlformats-officedocument.wordprocessingml.document

Hmm, ...
For bug submitters, it should be easy for them to find appropriate one.
For web browsers, it could be easy to find a proper application to open it.

Any thoughts?
Comment 8 tora3 2011-03-09 16:46:12 UTC
Oops, refined.

Microsoft Excel 95/97/2000/XP/2003 (.xls .xlt .xlc .xlm .xlw)
Microsoft PowerPoint 95/97/2000/XP/2003 (.ppt .pot .pps)
Microsoft Word 95/97/2000/XP/2003 (.doc .dot)

	application/vnd.ms-excel
	application/vnd.ms-powerpoint
	application/msword


Microsoft Office Excel 2007 (.xlsx .xlam .xlsb .xltm .xlsm .xltx)
Microsoft Office PowerPoint 2007 (.pptx .ppam .pptm .potm .ppsm .sldm .ppsx .sldx .potx)
Microsoft Office Word 2007 (.docx .docm .dotm .dotx)

	application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
	application/vnd.openxmlformats-officedocument.presentationml.presentation
	application/vnd.openxmlformats-officedocument.wordprocessingml.document

P.S.

ZIP Archive (.zip)
	application/zip
Comment 9 tora3 2011-03-09 17:36:56 UTC
=== Save as type of Microsoft Office Excel 2007 (English) ===
Excel Workbook (*.xlsx)
Excel Macro-Enabled Workbook (*.xlsm)
Excel Binary Workbook (*.xlsb)
Excel 97-2003 Workbook (*.xls)
XML Data (*.xml)
Single File Web Page (*.mht;*.mhtml)
Web Page (*.htm;*.html)
Excel Template (*.xltx)
Excel Macro-Enabled Template (*.xltm)
Excel 97-2003 Template (*.xlt)
Text (Tabl delimited) (*.txt)
Unicode Text (*.txt)
XML Spreadsheet 2003 (*.xml)
Microsoft Excel 5.0/95 Workbook (*.xls)
CSV (Comma delimited) (*.csv)
Formatted Text (Space delimited) (*.prn)
DIF (Data Interchange Format) (*.dif)
SYLK (Symbolic Link) (*.slk)
Excel Add-In (*.xlam)
Excel 97-2003 Add-In (*.xla)
PDF (*.pdf)
XPS Document (*.xps)
OpenDocument Spreadsheet (*.ods)

=== Save as type of Microsoft Office PowerPoint 2007 (English) ===
PowerPoint Macro-Enabled Presentation (*.pptm)
PowerPoint 97-2003 Presentation (*.ppt)
PDF (*.pdf)
XPS Document (*.xps)
PowerPoint Template (*.potx)
PowerPoint Macro-Enabled Template (*.potm)
PowerPoint 97-2003 Template (*.pot)
Office Theme (*.thmx)
PowerPoint Show (*.ppsx)
PowerPoint Macro-Enabled Show (*.ppsm)
PowerPoint 97-2003 Show (*.pps)
PowerPoint Add-In (*.ppam)
PowerPoint 97-2003 Add-In (*.ppa)
PowerPoint XML Presentation (*.xml)
Single File Web Page (*.mht;*.mhtml)
Web Page (*.htm;*.html)
GIF Graphics Interchange Format (*.gif)
JPEG File Interchange Format (*.jpg)
PNG Portable Network Graphics Format (*.png)
TIFF Tag Image File Format (*.tif)
Device Independent Bitmap (*.bmp)
Windows Metafile (*.wmf)
Enhanced Windows Metafile (*.emf)
Outline/RTF (*.rtf)
OpenDocument Presentation (*.odp)

=== Save as type of Microsoft Office Word 2007 (English) ===
Word Document (*.docx)
Word Macro-Enabled Document (*.docm)
Word 97-2003 Document (*.doc)
Word Template (*.dotx)
Word Macro-Enabled Template (*.dotm)
Word 97-2003 Template (*.dot)
PDF (*.pdf)
XPS Document (*.xps)
Single File Web Page (*.mht;*.mhtml)
Web Page (*.htm;*.html)
Web Page, Filtered (*.htm;*.html)
Rich Text Format (*.rtf)
Plain Text (*.txt)
Word XML Document (*.xml)
Word 2003 XML Document (*.xml)
OpenDocument Text (*.odt)
Works 6.0-9.0 (*.wps)
Comment 10 tora3 2011-03-09 17:44:43 UTC
I forgot to list the top-listed entry of PowerPoint:

PowerPoint Presentation (*.pptx)
Comment 11 tora3 2011-03-10 05:00:12 UTC
https://bitbucket.org/tora/tools/src/tip/mime-detection/file+/
now supports Microsoft Office Excel, PowerPoint and Word 97-2003.
Comment 12 bernd.eilers 2011-03-10 07:54:44 UTC
Created attachment 76067 [details]
Bugzilla Content Type template

This Bugizilla Content Type template contains in addition to the default template used by bugzilla zip, XML text, pdf and most common OpenOffice.org and Microsoft file formats.
Comment 13 Frédéric Buclin 2011-03-22 16:22:40 UTC
(In reply to comment #0)
>  Otherwise, choose a method for determining the content type.
>    (x) auto-detect --------- (2)
>    ( ) select from list: --- (3)
>    ( ) enter manually: ----- (4)
> 
> How accurately does auto-detect (2) work?

The MIME type is passed by your web browser at the same time as you upload your file. Bugzilla doesn't try to guess the file format itself.
Comment 14 tora3 2011-03-22 16:40:08 UTC
lpsolit: it seems you are right.

To make it better, i think, bei has been considering replacement of the 
Bugzilla's default "auto-detect" function with something more practical or 
addition of another choice for it.

e.g. 
http://tora-japan.com/wiki/file%2B_-_slightly_enhanced_mime_type_detection_command
Comment 15 bernd.eilers 2011-03-22 20:14:27 UTC
Yes we are going to switch to our own server detection soon using file+
browser detection will not be offered anymore than.
This has been succesfully tested on testopenoffice.org
Deployment to OOo production is currently blocked by kenai issues in other areas though.
Comment 16 bernd.eilers 2011-03-23 09:02:29 UTC
Created attachment 76172 [details]
testing new server side autodetect with odt
Comment 17 bernd.eilers 2011-03-23 09:29:07 UTC
fixed, server side autodetection is now available and user selectable types have been extended.

Follow up issue 117519 has been created to update server side autodetection to newer version of file+ which has become available just recently.
Comment 18 tora3 2011-03-24 15:00:06 UTC
bei: thank you for the implementation. it looks nice!!!
Comment 19 Oliver-Rainer Wittmann 2012-06-13 12:28:23 UTC
getting rid of value "enhancement" for field "severity".
For enhancement the field "issue type" shall be used.