How to send request multipart/form-data

asked 2015-07-01 13:55:48 +0800

HuySeven gravatar image HuySeven
1 1

I have a code as below: file "upload.zul"

<div id="S7" apply="org.zkoss.bind.BindComposer" viewModel="@id('vm') @init('com.fileupload.FileUploadController')" >

        <div onload=init()>
            <form method="post" enctype="multipart/form-data">
                <input type="file" id="uploadPath" onChange="doChange()" width="100%"/>
        function doChange() {
            zAu.send(new zk.Event(zk.Widget.$('$lFilePath'), 'onJSChange', jq("#uploadPath").val()));
     <div id="lFilePath">


I want upload file to server Please, help me Thanks

Currently the above code, I have call handling and get filenames file FileUploadController.java

public void onJSChange(Event event) {
delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
link publish delete flag offensive edit

answered 2015-07-06 02:14:24 +0800

HuySeven gravatar image HuySeven
1 1

Thank you Darksu, But I want to upload by Zul file as I described

link publish delete flag offensive edit


You can use button component on zul page with upload feature enabled, and listen to onUpload event.

vincentjian ( 2015-08-13 09:03:26 +0800 )edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2015-07-01 13:55:48 +0800

Seen: 35 times

Last updated: Jul 06 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More