Opened 12 years ago

Last modified 7 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 12 years ago by Jakub Ś

Component: GeneralFile Browser
Status: newconfirmed
Version: 3.0

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.

comment:2 Changed 7 years ago by riczha

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?

comment:3 Changed 7 years ago by Jakub Ś

I'm sorry but no one is working on this ticket at the moment.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy