Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Apr 8, 2026. It is now read-only.

Permission denied error when uploading to another site via an iframe (IE8)#435

Closed
gammons wants to merge 1 commit into
blueimp:masterfrom
gammons:master
Closed

Permission denied error when uploading to another site via an iframe (IE8)#435
gammons wants to merge 1 commit into
blueimp:masterfrom
gammons:master

Conversation

@gammons

@gammons gammons commented Jun 24, 2011

Copy link
Copy Markdown

IE is giving me a "permission denied" error when attempting to use jquery file upload to upload to another domain. This was not an issue with v4.

The crux of the issue is this: http://stackoverflow.com/questions/1886547/access-is-denied-javascript-error-when-trying-to-access-the-document-object-of

My fix worked for me, however I need your input for the following reasons:

  1. The test suite did not work for me. It died after test issue with using multiple upload widgets on the same page #12, Callbacks: send (0, 1, 1). It just seems to hang. This is the case even if I revert my changes. So please run your test suite against my change.
  2. I don't have enough insider knowledge to know if my fix will break other things. Please review.

Thanks!

@blueimp

blueimp commented Jun 25, 2011

Copy link
Copy Markdown
Owner

Thanks for your issue report and contribution.
I couldn't accept your pull request as your code change would break accessing the response content for same-domain requests using the Iframe Transport.
However, I added a try/catch block around the content document access call for the iframe, which catches the cross-domain exception thrown by IE:
d5bc1e8

Regarding the unit tests, they should all complete 100% on all browsers.
But so far no cross-domain test has been added.
If you adjust the url of the test form to point to a different domain, Firefox will stop on test 12 (Callbacks: send), as the OPTIONS request sent by Firefox on cross-domain requests will result in an error.
IE will run through, but fail on the sequential uploads tests as it cannot handle cross-domain XHR requests (jQuery will report "No Transport").
Anyway, the tests have not been built for cross-domain runs, but such tests might be explicitly added sometime in the future.

@blueimp blueimp closed this Jun 25, 2011
@gammons

gammons commented Jun 26, 2011

Copy link
Copy Markdown
Author

Thanks for the quick response and fix!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants