0

12:http://docs.zkoss.org/wiki/ZK_5:_New_File_Upload

asked 2009-08-04 07:22:25 +0800

anonymous gravatar image anonymous
1

Well,

Always doing great staff.

Without words to tell how cool it is.

Cheers,

delete flag offensive retag edit

20 Replies

Sort by ยป oldest newest

answered 2009-08-04 07:24:31 +0800

anonymous gravatar image anonymous
1

Is there something to compress the file at client before upload?

Do you send the file compressed to the server? Well maybe it is send to server compressed by GZIP by default.

Cheers,

link publish delete flag offensive edit

answered 2009-08-04 10:40:08 +0800

anonymous gravatar image anonymous
1

I don't think HTML FORM submission supports any compression, unless you implement it with Flash, do you?

link publish delete flag offensive edit

answered 2009-08-04 15:47:23 +0800

anonymous gravatar image anonymous
1

How Greate it is!
Cheers.

link publish delete flag offensive edit

answered 2009-08-04 17:23:19 +0800

anonymous gravatar image anonymous
1

Will this allow multiple files to be selected at the same and all uploaded at once?

link publish delete flag offensive edit

answered 2009-08-04 18:31:14 +0800

anonymous gravatar image anonymous
1

I think browser won't let you do this.
you need to open lots of XMLHttpRequests.

link publish delete flag offensive edit

answered 2009-08-05 03:57:13 +0800

anonymous gravatar image anonymous
1

Multiple selection will be supported in the later version, but it requires Flash (not just pure HTML+JavaScript).

However, it might not be a good idea to upload all files simultaneously since it will have some performance impact to the server (network traffic).

BTW, the browser has the limitation about how many connections can be made to the same server. So, uploading multiple files at the same time requires Flash (or other plugin), too.

link publish delete flag offensive edit

answered 2009-09-17 15:20:30 +0800

anonymous gravatar image anonymous
1

I have a problem with the 3th example.

Method, setLabel, not found for class org.zkoss.zul.Fileupload
org.zkoss.zk.ui.metainfo.PropertyNotFoundException

What could be the reason?
Thanks.

link publish delete flag offensive edit

answered 2009-09-23 15:21:54 +0800

jumperchen gravatar image jumperchen
3909 2 8
http://jumperchen.blogspo... ZK Team

It is a ZK5 version.

link publish delete flag offensive edit

answered 2010-02-18 15:58:30 +0800

anonymous gravatar image anonymous
1

how does Gmail support multiple files upload? It doesn't seem to be using Flash. Also, do you have any idea when this will be supported in ZK?

Thank you

link publish delete flag offensive edit

answered 2010-02-25 16:11:06 +0800

anonymous gravatar image anonymous
1

I have trouble to make this work with only java. How can I save the files uploaded and I can't get the image.setContent(event.getMedia()) working. Also every image I upload is rejected as image (if (media instanceof org.zkoss.zul.Image)). Can somebody tell me what I did wrong

zulfile:
----
<?xml version="1.0" encoding="UTF-8"?>
<zk xmlns="http://www.zkoss.org/2005/zul">
<window id="win2" title="upload" border="normal" apply="control.w2Controller">
<fileupload id="upl" label="Attach" upload="true" />
<image id="img" />
</window>
</zk>

javafile:
----
package control;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.UploadEvent;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Fileupload;
import org.zkoss.zul.Window;
import org.zkoss.zul.Image;

public class w2Controller extends GenericForwardComposer
{
private Image img;
private Fileupload upl;

@Override
public void doAfterCompose(Component win) throws Exception
{
super.doAfterCompose(win);
((Window)self).setTitle("init");
}

public void onUpload$upl(UploadEvent event) throws InterruptedException
{
((Window)self).setTitle("uploaded");
Object media = event.getMedia();

if (media instanceof org.zkoss.zul.Image) // <- never true, even as image???
{
//img.setContent(media); // <-- this will not compile
}
else
{
alert("not an image");
((Window)self).setTitle("uploaded -> not an image");
}
}
}

link publish delete flag offensive edit
Your reply
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

Follow

RSS

Stats

Asked: 2009-08-04 07:22:25 +0800

Seen: 18 times

Last updated: Feb 14 '11

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