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

Upload of XAR file by REST API not working any longer in 16.x when not providing the content type explicitly

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Blocker
    • 17.4.0-rc-1, 16.10.7
    • 16.10.6, 17.3.0
    • REST, Wiki
    • Ubuntu/WSL, XWiki 16.10.6 + 17.3.0
    • Unknown

    Description

      It seems that the REST API for uploading XAR files (= POST on "...rest/wikis/xwiki") is not working properly since 16.x.
      The following is working fine with XWiki v15.10.16, but not with v16.10.6 and also not with v17.3.0 (while in all three cases XWiki responses with "200 OK"):

      Let's assume your username is "Admin" and your password is "admin".
      Also, let's assume the current XWiki form token is "5OJMPDtpV5NiV8zIfOgBNA".
      Last but not least, let's assume that your XWiki Server is running on http://localhost:8080/xwiki/

      • Please create a page "Test" with content "Hello!".
      • Export page "Test" to "Test.WebHome.xar".
      • Now, delete page "Test" and make sure it is really deleted.
      • Then open a terminal and run:
        curl -v -u Admin:admin -H "XWiki-Form-Token: 5OJMPDtpV5NiV8zIfOgBNA" -F "file=@./Test.WebHome.xar" localhost:8080/xwiki/rest/wikis/xwiki
      • Now page "Test" should exist again in your XWiki.

      Like said, working with 15.x, but not with 16.x and 17.x

      Is this a bug or am I just using wrong API calls?

      Thank you very much in advance.

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            rao Ralf
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: