-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I want to get the size of the attachment first, then upload it. Thanks.
If you will check ZK LINK you will get how they doing same thing which you needed, please see the Java Script Code for same they are using
<script type="text/javascript"><![CDATA[
function testUpload(viewer) {
for (var i = 0 ; i < 5; i ++ ) {
(function() {
var fakeLoader = { id: 'tmp' + new Date().getTime() + i},
muv = viewer == 1 ?
new zk.UPMSample1(fakeLoader, "TempFile" + parseInt((Math.random() + 1)*10) ):
new zk.UPMSample2(fakeLoader, "TempFile" + parseInt((Math.random() + 1)*10) ),
fsize = 12345678*Math.random() + 1;
muv.pct = 0;
var pgs = setInterval(function() {
muv.pct += parseInt(Math.random()*19);
if (muv.pct >= 100) {
clearInterval(pgs);
muv.pct = 100;
}
muv.update(muv.pct, fsize);
if (muv.pct == 100)
muv.destroy();
}, 678);
})();
}
}
]]></script>
I think we can do same from Java Code
Asked: 2013-08-25 04:45:21 +0800
Seen: 9 times
Last updated: Aug 26 '13
composite component help [closed]
EL in a forEach @command not working?
Different template for each grid row
Cardlayout animation is broken
Grid RowRender slow using 6.5.1 and sizable=true
setVisible(false), component will load or not
Decimalbox and doublebox value rounded on iPad
history management with page status