Problem saving blobs to a file with .xml extension

Not reproducible Issue #13751238


Cezary K.
Sep 14, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

Saving a blob to a file with “.xml” extension does not work. Changing the code below to save to a file with .txt works.

var data = "<?xml version=’1.0’ encoding=’UTF-8’?>";

// 1. this will give “test.xml couldn’t be downloaded error”
navigator.msSaveBlob(new Blob([data], “text/xml”), “test.xml”);

// 2 this will give “test.xml couldn’t be downloaded error”
let a = document.createElement(‘a’);
a.href = window.URL.createObjectURL(new Blob([data], “text/xml”)); = "test.xml";


2 attachments

Comments and activity

  • Microsoft Edge Team

    Changed Assigned To to “Steven K.”

  • Hi Cezary,

    Have you tried using window.navigator.msSaveBlob()?
    = new
    (["<?xml version=’1.0’ encoding=’UTF-8’?>

    •   "<CATALOG>


    •   "<PLANT><COMMON>Bloodroot</COMMON><BOTANICAL>Sanguinaria canadensis</BOTANICAL></PLANT>


    •   "<PLANT><COMMON>Columbine</COMMON><BOTANICAL>Aquilegia canadensis</BOTANICAL></PLANT>


    •    "</CATALOG>



    , ‘msSaveBlob_testFile.xml’
    I have attached my complete example. Here is the link I used as a reference.

    Let me know what you find,

  • Yes I did, as you can see in the example above I have tried both: 1. Using msSaveBlob & 2. Using a link. Same error in both cases

  • In your example, you are using navigator.msSaveBlob.  That is for IE, I believe.

    Can you run the repro I attached and let me know the results?

  • If I run index.html by clicking the attachment -> works
    If I save index.html to desktop first before running it -> fails

  • Perhaps there is a file permission issue?  Can you make sure the downloaded and saved ‘index.html’ is unblocked?  I have attached a screenshot of the unlock option.  Right click on the file and select properties to get to this screen.

  • It’s definitely not blocked since I can change the extension back and forth “.xml” not working, “.txt” working.

  • It was not clear if you checked the “unblock” property.  You can rename a blocked file.

    Let me know and thanks,


  • Microsoft Edge Team

    Changed Status to “Not reproducible”

You need to sign in to your Microsoft account to add a comment.

Sign in