Is there an easy way to make the fileupload work w

2019-08-10 07:19发布

In IE11 file upload button of ZK is not working.

I got few replies, It says after updating ZK it will fix the problem.

But we can't update ZK, So in this scenario is there any way to work out this problem any how.

3条回答
The star\"
2楼-- · 2019-08-10 07:31

If you can't upgrade ZK then you can try to "downgrade" the IE using "X-UA-Compatible" either as meta-tag or as a response header

here an example using the meta tag:

<?meta http-equiv="X-UA-Compatible" content="IE=10" ?>
<zk>
  <fileupload label="upload" onUpload="alert(event.getMedia().getName())"/>
</zk>

and what it looks like in the browser (in the IE dev tools F12 you can check if the meta tag had an effect, you'll see that IE falls back to version 10):

http://screencast.com/t/ftheLA9Ud8

查看更多
在下西门庆
3楼-- · 2019-08-10 07:40

Finally I got the Solution. AS IE 11 having problem to attach event for listening to open File chooser. You just manually add the listener.

<button id="browsebtn"  upload="true,maxsize=-1" visible="true" sclass="text">
<attribute w:name="doMouseDown_">
            function (evt) {

            }
            </attribute>
</button>
查看更多
ゆ 、 Hurt°
4楼-- · 2019-08-10 07:50

Its simple and weird, However what I found is make the parent component as draggable="true"

<row draggable="true">
    <div style="text-align : right;">
        <label value="Image File:" />
    </div>
    <fileupload id="fileUpload" label="Upload" tooltiptext="Click to upload image file."/>
</row>

Now suddenly you will see your fileupload button in ZK started working correctly for IE11 as well.

查看更多
登录 后发表回答