Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-13429

Attachments mime type is not actually stored in the database (NULL all the time)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 8.1, 7.4.4
    • 8.0
    • Attachments
    • None
    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce:

      • Create a new page, say TestPage.WebHome
      • attach a new file to this page, favicon-ball.ico, for example.
      • a query to the database with
        select XWA_FILENAME, XWA_MIMETYPE from xwikiattachment, xwikidoc where xwa_doc_id = xwd_id and XWD_fullname='TestPage.WebHome';

        shows

        +------------------+--------------------------+
        | XWA_FILENAME     | XWA_MIMETYPE             |
        +------------------+--------------------------+
        | favicon-ball.ico | image/vnd.microsoft.icon |
        +------------------+--------------------------+
        
      • edit the document, type some text, save
      • the same request to the database shows this:
        mysql> select XWA_FILENAME, XWA_MIMETYPE from xwikiattachment, xwikidoc where xwa_doc_id = xwd_id and XWD_fullname='TestPage.WebHome';
        +------------------+--------------+
        | XWA_FILENAME     | XWA_MIMETYPE |
        +------------------+--------------+
        | favicon-ball.ico | NULL         |
        +------------------+--------------+
        

      So somehow the mimetype of the attachment gets stored but then gets deleted again from the database.

      I am on MySQL database, default settings for attachments storage (database).

      Attachments

        Issue Links

          Activity

            People

              tmortagne Thomas Mortagne
              lucaa Anca Luca
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: