valli valli - 4 years ago 1321
Javascript Question

extjs file uploads through form submit for cross domain

I would like to upload files to cross domain server from using

method. When i call
, request is going to my restful web service and file is getting uploaded successfully. But the response is blocked at the browser with message: Blocked a frame with origiā€¦host:1841" from accessing a cross-origin frame.

From older posts and form submit code, i found that
is sending the Ajax request with out
statement due to which cross domain response is blocked.

I thought of sending normal Ajax request but dont know how the file data can be read and send to server through ajax request.

Is there anyway in to send the file data to server as
does? Can someone help me on this problem?


Solution is: What does document.domain = document.domain do? and

Answer Source

Ajax call does not work with downloading and i presume with uploading files.

Have you tried to set this before doSubmit:

Ext.Ajax.cors = true;
Ext.Ajax.useDefaultXhrHeader = false;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download