Skip to end of metadata
Go to start of metadata

Tried to backup/restore from one Confluence system to another. The file is downloaded as zip package, it can be opened, everything looks reasonable. For the restore though I get the following error: "unable to recognise uploaded file type: multipart/form-data", even when it's uploaded to the very same system the backed was created and downloaded from.
What is wrong?

(Adaptavist: There is a Firefox fix for the issue in this comment)

  • No labels

12 Comments

  1. Unknown User (conflman)

    Hi,

    I achieve a similar errormessage, when uploading a backup

    unable to recognise uploaded file type: application/x-download
    

    Sorry, but this is an important function. Please find a solution (sad)

  2. It's likely to be your browser telling the server that it is uploading the wrong mime-type - x-download is used to force the browser into saving the file. The browser should be uploading the file as x-zip.

    A more detailed investigation would require a support contract to be in place.

    1. Unknown User (scayla)

      I kinda get the same error.
      With firefox, uploading the zip file tells me "unable to recognise uploaded file type: application/binary"
      With chrome, the message for the same zip file is : "unable to recognise uploaded file type: application/octet-stream"
      As you said Alain, the browsers are telling the server to use the wrong mime-type.

      Finally, if I unzip the file and only upload the "layout-data.xml" file, ticking no select box at upload (not ticking the "merge" box), the layout seems to be uploaded.
      I've just backed up and restored the same layouts, however the options I've ticked in the "options" tab are not the same as before the upload. I have to manually modify them.

      (builder 4.0.2)

      1. Your browser is doing silly things with the mime-type, unfortunatley there is not a lot I can do about that ... it's possible I could alter the code so that it ONLY takes a zip file, however that would prevent you from using older xml backups as you are doing.

        1. Unknown User (scayla)

          Weird.
          I've tried on another computer and it works with firefox but same error with Chrome.
          So my computer must be the cause, at least for firefox. May be an add-on, don't really know.

          My other big problem with the upload is that information about whether to display displayed parts in the layout or not (like right sidebar, title, footnote) are not restored.
          For example, if the backup for my layout AAA says not to display the right sidebar, but display title and footnote, when I restore my backup, rightsidebar is displayed and not title nor footnote. Same for some options : force comments to be displayed are unticked instead of being ticked, same for the breadcrumbs parts ("display dashboard in breadcrumbs tray", "display space in breadcrumbs tray").

          May be I'm doing something wrong with the boxes to tick when uploading a backup: Nothing is ticked, not even the "merge" box. This should the a "clean install", am I wrong? Could there be any bug somewhere?

          1. The only way to do a clean install is to delete all of your layout data before uploading the new file ... I would be interested to hear whether you are having backup problems after doing a true clean-install of your layout data ... also how heavily nested are your layouts, is the sidebar visibility a property of the parent layout, are you exporting the parent layout?

            1. Unknown User (scayla)

              By deleting my layout data, I will also loose the links between my spaces and layout, am I grong? If so, I'll do it later but I'll try.

              The sidebar is visible in my parent layout yes, but not in the nested one. Same for all the other attributes. (title and footnote are hidden in the parent, but shown in the child), and I'm doing a backup/restore of all layouts at once.

              I'm quite sure I didn't have this problems with Builder 3

              1. Are you able to create a test-case which can demonstrate this problem every time?

                1. Unknown User (scayla)

                  As simple as it may appear, the backup I've attached here reflects the test-case.
                  I'll describe quickly what you should see and what you see when restoring.

                  Before:

                  ONE :
                  no Remove Dashboard from Breadcrumb Trail
                  yes Remove Space from Breadcrumb Trail
                  yes Remove Home/Orphan Page from Breadcrumb Trail
                  RSB displayed

                  CHILDONE :
                  yes Remove Dashboard from Breadcrumb Trail
                  no Remove Space from Breadcrumb Trail
                  no Remove Home/Orphan Page from Breadcrumb Trail
                  RSB hidden

                  After upload:
                  ONE :
                  no Remove Dashboard from Breadcrumb Trail
                  yes Remove Space from Breadcrumb Trail
                  yes Remove Home/Orphan Page from Breadcrumb Trail
                  RSB displayed

                  CHILDONE :
                  yes Remove Dashboard from Breadcrumb Trail
                  yes Remove Space from Breadcrumb Trail
                  yes Remove Home/Orphan Page from Breadcrumb Trail
                  RSB displayed

                  HTH

  3. I had the same problem - Windows XP/Firefox3 user.

    This is a known issue with Firefox and there are many discussions on the web about it. The problem seems to be that the mime-type for zip is missing, or gets set to “application download” when it needs to be “application/x-zip-compressed”. I found a solution in the reviews of a Firefox Add-On that enables mime-type editing.
    https://addons.mozilla.org/en-US/firefox/reviews/display/4498?show=20
    Edit: https://support.mozilla.com/fy-NL/questions/738336#answer-111160

    Unfortunately the version of the Add-On currently held on Mozilla’s site won’t work with Firefox 3+, but the developer has got a version on their own site. This is not in English, but you can still make out the download links. I got the 3.0. * ~ 3.7. * version.
    http://space.geocities.yahoo.co.jp/gl/alice0775/view/20080912/1221150790

    Once downloaded, open the xpi with firefox and the install works as with any other Add-On.

    • Restart Firefox and the go to to Tools > Mime Edit and choose the “Edit” tab
    • Look for the settings for zip in the list of files types, when you select a file type, a description of it is displayed in a box
    • If you find the settings for zip, click on the “Edit” button, if you don’t, click on the “New Type…” button
    • Enter these settings:
      MIME Type: application/x-zip-compressed
      Description: ZIP files (or anything else)
      Extension: zip
    • Tick the box for "Always ask me before handling files of this type"
    • Click on OK > OK

    You should now be able to use the backup/restore function as normal.

    Resources

    1. Unknown User (scayla)

      Great! I'll have a look at it.
      The working firefox for uploading a backup is version 3.6.2 . Mine is 3.6.3 and doesn't work. At first sight at least. I'll have a deeper look at this issue.

      Thanks for your time (smile)

    2. Oops just found a problem with my fix, when you now try to download a zip file it automatically unzips it into your temp folder. I'm ok with fishing it out of there (for now) but you may decide its not worth the hassle. I'll update if I find anything better.

      Fix Found: In MIME-Edit make sure "Always ask me before handling files of this type" is ticked. It will now prompt before download, and upload works as normal.