-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi guys, I try to call Filedownload.save(<somecontent>, "text/plain", "Somename#1.txt"); and after this call my browser going to download file with name Somename (without #1.txt)
How should I call Filedownload.save to get file with correct name? Thanks!
Hello neonomaly,
Please use the following example:
https://www.zkoss.org/zkdemo/filehandling/filedownload
Best Regards,
Darksu
Hello neonomaly,
Regarding the byte array you can start by using the following script:
<button label="test">
<attribute name="onClick">
<![CDATA[
String example = "This is an example";
byte[] bytes = example.getBytes();
Filedownload fdl = new Filedownload();
fdl.save(bytes, "text/plain", "test.txt");
]]>
</attribute>
Furthermore can you give an example of a name (with sharp)?
Best Regards,
Darksu
Asked: 2016-04-01 13:45:07 +0800
Seen: 18 times
Last updated: Apr 03 '16
>https://www.zkoss.org/zkdemo/filehandling/filedownload That doesn't work for me... I have only name (with sharp), content-type and byte array with data in pure java. Can someone offer other options? Thanks!
neonomaly ( 2016-04-02 17:22:10 +0800 )edit