fileupload not worked

asked 2015-11-23 18:17:54 +0800

nsaazn gravatar image nsaazn
13 2

Hello, I'm trying to use fileupload element in zk 7.0.3:

<button id="btnUpload" label="Upload" upload="true,maxsize=-1" />

But, onUpload event is not rised.
Here is browser console log: Refused to display 'http ://localhost:8080/DbUIBuilder/zkau/upload?uuid=oMIQa0&dtid=z_wai&sid=0&maxsize=-1' in a frame because it set 'X-Frame-Options' to 'DENY'.
What i am doing wrong?

delete flag offensive retag edit

3 Answers

Sort by ยป oldest newest most voted

answered 2015-12-01 13:31:38 +0800

nsaazn gravatar image nsaazn
13 2

Hello Darksu,

I use spring-security (not to be confused with the ZK Spring security). By default, it sets X-Frame-Options to DENY.
For zk framework X-Frame-Options should be set to SAMEORIGIN:
spring security xml configuration:

    <logout logout-url="/logout" />
        <frame-options policy="SAMEORIGIN"/>

or java configuration:

 public class WebSecurityConfig extends
    WebSecurityConfigurerAdapter {

protected void configure(HttpSecurity http) throws Exception {
        // ...

This configuration fixes the problem.

link publish delete flag offensive edit

answered 2015-11-23 19:18:03 +0800

Darksu gravatar image Darksu
1991 1 4

Hello nsaazn,

Please try out the solution provided at the following url:


Best Regards,


link publish delete flag offensive edit

answered 2018-01-17 01:05:19 +0800

takach gravatar image takach
30 2

Thank you for this solution, it solved my issue when upgrading to Spring 4 and Spring Security 4.

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

1 follower



Asked: 2015-11-23 18:17:54 +0800

Seen: 44 times

Last updated: Jan 17 '18

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