Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-3817

Filedownload on Android not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.1
    • 8.5.0
    • ZK Client Engine
    • Security Level: Jimmy
    • tested on
      Andoid (7/8) (Chrome/FF/Default Browser)

    • ZK 8.5.1 R1
    • None

      Steps to Reproduce

      trigger a download on an android device:

      <button label="download" onClick='Filedownload.save("text file content", "text/plain", "test.txt");'/>
      

      Current Result

      nothing happens

      Expected Result

      download starts

      Debug Info

      can also reproduced in a desktop chrome by enabling the mobile emulation e.g. for Nexus 6P

      Root Cause

      the download function zk.cmd0.download is overridden for mobile devices trying to trigger the download using an alternative approach which fails due to untrusted click events.

      It seems the alternative download approach is no longer needed on android (to be tested/verified)

      Workaround

      restore the desktop version of the download function
      -> see attachment

            bobpeng bobpeng
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Time Spent - 3 hours Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - 3 hours Remaining Estimate - 1 hour
                3h