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)

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 8.0
    • Fix Version/s: 8.1, 7.4.4
    • Component/s: Attachments
    • Labels:
      None
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      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

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Date of First Response: