Uploaded image for project: 'ZATS'
  1. ZATS
  2. ZATS-37

File download does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 1.2.0
    • Mimic
    • None

      I try to download a file by calling:

      desktop.query("button[label='Download']").click();

      and I receive the following response:

      TRACE org.zkoss.zats.mimic.impl.response.DownloadHandler - download event: /myapp/zkau/view/z_eh6/dwnmed-0/7qo1/myfile.zip

      but when I try to download the file like this:

      Resource resource = desktop.getDownloadable();
      String content = fetchContent(resource.getInputStream());

      I get:

      Caused by: java.io.FileNotFoundException: http://127.0.0.1:57722/myapp/myapp/zkau/view/z_eh6/dwnmed-0/7qo1/myfile.zip
      at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1439)
      at org.zkoss.zats.mimic.impl.EmulatorClient.openConnection(EmulatorClient.java:320)
      at org.zkoss.zats.mimic.impl.response.DownloadHandler$DownloadableImpl.getInputStream(DownloadHandler.java:80)

      Notice the repeated application name in the zkau GET request.

            Unassigned Unassigned
            m17 m17
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: