0

maximize file's size upload

asked 2014-04-10 12:36:15 +0800

mohammedD gravatar image mohammedD
1

updated 2014-04-11 17:21:11 +0800

sitansu gravatar image sitansu
2254 13
http://java91.blogspot.in...

how to maximize the size of a file uploaded i create component in my controller like this

Button buttonUpload = new Button("Ajouter un fichier");
buttonUpload.addEventListener(Events.ON_UPLOAD, new EventListener<UploadEvent>() {
    @SuppressWarnings("unchecked")
    @Override
    public void onEvent(UploadEvent event) throws Exception {
------------------- traitement--------------
}

in zk.xml i try to do this <system-config> <max-upload-size>-1</max-upload-size> </system-config>

i got this error :

11:25:54,879 GRAVE [org.zkoss] (http-localhost-127.0.0.1-8080-3) Failed to upload

org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the request was rejected because its size (7559608) exceeds the configured maximum (5242880)

i need help

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-04-14 07:49:01 +0800

IngoB gravatar image IngoB flag of Germany
256 6

updated 2014-04-14 07:50:27 +0800

Have you tried:

http://books.zkoss.org/wiki/ZKComponentReference/Essential_Components/Fileupload

http://www.zkoss.org/javadoc/7.0.1/zk/org/zkoss/zul/Fileupload.html

http://www.zkoss.org/javadoc/7.0.1/zk/org/zkoss/zul/Button.html#setUpload(java.lang.String)

<button label="Upload" upload="true,maxsize=-1,multiple=true,accept=audio/*|video/*|image/*,native"

maxsize: the maximal allowed upload size of the component, in kilobytes, or a negative value if no limit.

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

Follow
1 follower

RSS

Stats

Asked: 2014-04-10 12:36:15 +0800

Seen: 26 times

Last updated: Apr 14 '14

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