Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-3081

Data downloading issue on Microsoft Edge browser

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • front-end
    • None

    Description

      We are running into an Angular JS issue with Edge browser when downloading the CSV files by using the Zeppelin download tool, as shown below. The issue is that the download functionality is not triggered when hitting the button on Edge browser, while it works for Chrome.

      By looking at Zeppelin JS code, the issue is from here: https://github.com/apache/zeppelin/blob/b21f89f6fe8dfe209ee6e827b6092c2ae9fe7314/zeppelin-web/src/app/notebook/save-as/save-as.service.js#L51

      The reason that downloading was not happening is because click() did not have any effect for the element “saveAsElement[0].click()”

      This is the element: <a id="SaveAsId" href="blob:DA0847A8-4FE4-48B7-81E7-230874E3E88C" target="_blank" download="test"></a>

      Below is my debugging code and result on Edge browser. Nothing happened when running the last line: “saveAsElement[0].click()”. On Chrome the same code will trigger the csv file download. I suspect this is due to some compatibility issue with Angular JS on Edge.

      Debugging code:
      binaryData = []
      content = window.URL.createObjectURL(new Blob(binaryData))
      angular.element('body').append('<a id="SaveAsId"></a>')
      saveAsElement = angular.element('body > a#SaveAsId')
      saveAsElement.attr('href', content)
      saveAsElement.attr('download', 'test')
      saveAsElement.attr('target', '_blank')
      saveAsElement[0]
      //<a id="SaveAsId" href="blob:DA0847A8-4FE4-48B7-81E7-230874E3E88C" target="_blank" download="test"></a>
      saveAsElement[0].click()
      // Nothing happens on Edge

      Attachments

        Activity

          People

            Unassigned Unassigned
            taoli-hwx Tao Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: