Opened 13 years ago
Last modified 8 years ago
#9073 confirmed Bug
ImageUpload callback can not be called cross-domain.
Reported by: | Enzo90910 | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | File Browser | Version: | 3.0 |
Keywords: | Cc: |
Description
When using filebrowserImageUploadUrl, CKEditor creates an iframe and loads the given filebrowserImageUploadUrl as the source for the iframe. It is my understanding that the HTML loaded in the iFrame is then supposed to execute a Javascript looking like this:
window.parent.CKEDITOR.tools.callFunction(CKEditorFuncNum, uploadedImageUrl, sucessMessage);
The problem is that when filebrowserImageUploadUrl is not on the same domain as the originalPage, browsers absolutely refuse the javascript to access window.parent.CKEDITOR, and the callback is never called back. If I analyzed the problem correclty, this could probably be made to work by creating a <script> tag instead of an <iframe>, in which case there is no cross-domain problem.
Change History (3)
comment:1 Changed 13 years ago by
Component: | General → File Browser |
---|---|
Status: | new → confirmed |
Version: | → 3.0 |
comment:2 Changed 8 years ago by
Hi there, I am using the 4.6.0 version and I am still hitting the same issue. just wondering if there is any workaround?
It seems the my server (different domain) uploading part is fine but the callFunction is blocked due to the XORS limitation.
any update on this ticket?
We are aware of this problem but this will be done with window.postMessage (E.g. https://developer.mozilla.org/en/DOM/window.postMessage) and not with scripts.