From The Document Foundation Wiki
    < QA‎ | Bugzilla(Redirected from QA/Bugzilla-Attachments)

    This page is about Attachments in Bugzilla.

    Filesize Limit

    • Currently 30MB

    Temporarily, we're putting files too large for Bugzilla here on the wiki or on Nextcloud:

    MIME Type Problems

    UPDATE: Based on pre- and post-migration testing, we believe that the new TDF Bugzilla does not suffer from the mimetype problems seen on FDO Bugzilla. However, there are browser bugs that still cause problems. Currently we are aware of a mimetype bug in Firefox that was reported in 2007.

    We sometimes have problems getting the right MIME type set on Bugzilla attachments. For a period of time, auto-detection for MIME types was disabled in FDO Bugzilla. Tollef re-enabled auto-detection for the LibreOffice product (thank goodness!).


    • Many attachments have incorrect MIME type
    • Many binary documents are marked as text/plain


    Michael Stahl points out that there are some special cases to consider when cleaning up MIME types:


    It makes sense for us to have some type of automation (or at least automatic notification) to help us clean up improperly-annotated attachments.

    External References

    Current Manual Fixing

    What we do now:

    1. Look up attachments of a particular MIME type - "set a 'Custom Search' on 'Attachment mime type' 'is equal to' <mime type you would like to kill>"
    2. Look at file extension and confirm that it matches the MIME type in Bugzilla
    3. If the extension does not match the MIME type, update the MIME type (Note: See MStahl's cautionary note about believing file extensions, above)

    Shortlist of extensions and MIME types

    File Extension MIME type
    Image Formats
    JPEG Image jpg, jpeg image/jpeg
    PNG Image png image/png
    SVG Image svg image/svg+xml
    OpenDocument Formats
    OpenDocument Text ODT application/vnd.oasis.opendocument.text
    OpenDocument Graphics ODG application/
    OpenDocument Presentation ODP application/vnd.oasis.opendocument.presentation
    OpenDocument Spreadsheet ODS application/vnd.oasis.opendocument.spreadsheet
    OpenDocument Formula ODF

    (yes, really!)

    OpenDocument Database ODB application/vnd.oasis.opendocument.database
    Flat ODF stuff many Unclear...perhaps text/xml ?
    MS OOXML Formats
    OOXML Spreadsheet XLSX application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
    OOXML Spreadsheet + Macros XLSM application/
    OOXML Spreadsheet Binary + Macros XLSB application/
    OOXML Spreadsheet Template XLTX application/vnd.openxmlformats-officedocument.spreadsheetml.template
    OOXML Presentation PPTX application/vnd.openxmlformats-officedocument.presentationml.presentation
    OOXML Slideshow PPSX application/vnd.openxmlformats-officedocument.presentationml.slideshow
    OOXML Presentation Template POTX application/vnd.openxmlformats-officedocument.presentationml.template
    OOXML Wordprocessing DOCX application/vnd.openxmlformats-officedocument.wordprocessingml.document
    OOXML Wordprocessing Template DOTX application/vnd.openxmlformats-officedocument.wordprocessingml.template
    MS Binary Formats
    MS PowerPoint (binary) PPT application/
    MS PowerPoint Show (binary) PPS application/
    MS PowerPoint Template (binary) POT application/
    MS Word (binary) DOC application/msword
    MS Word Template (binary) DOT application/msword
    MS Excel (binary) XLS application/
    MS Excel Template (binary) XLT application/
    Everything Else
    RTF rtf application/rtf
    PDF pdf application/pdf
    MS Visio (XML) vsdx application/
    MS Visio (binary) vsd application/vnd.visio
    MS Publisher pub application/x-mspublisher
    Apple Pages (iWork) pages application/
    Apple Numbers (iWork) numbers application/
    Apple Keynote (iWork) key application/
    Apple Works / Claris Works cwk application/clarisworks
    Mac Writer mw application/macwriteii
    Hangul hwp application/x-hwp
    pdb application/x-aportisdoc
    pdb_plucker application/prs.plucker
    pdb_palm application/vnd.palm
    lrf application/x-sony-bbeb
    psw application/x-pocket-word
    602 application/x-t602
    fb2 application/x-fictionbook+xml
    fh image/x-freehand
    cmx image/x-cmx
    wpg image/x-wpg


    The general idea

    1. Create user 'MIMEtype Fixer'
    2. Use XML-RPC/etc.. API
    3. Get list of all attachments (id, filename, MIMEtype)
    4. Foreach attachment, compare (embedded) file MIMEtype w/Bugzilla MIMEtype
      • If they don't match, fix (or possibly review before fix)