Opened 9 years ago

Last modified 9 years ago

#13475 confirmed New Feature

File upload with CORS (cross origin resource sharing)

Reported by: Piotrek Koszuliński Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.0 Beta
Keywords: Cc:

Description

As mentioned in http://docs.ckeditor.com/#!/guide/dev_file_upload

You can also add custom request headers or set flags for the default request. This is especially useful for enabling Cross-Origin requests. For more information about Cross-Origin Resource Sharing see here:

editor.on( 'fileUploadRequest', function( evt ) {

var xhr = evt.data.fileLoader.xhr;

xhr.setRequestHeader( 'Cache-Control', 'no-cache' ); xhr.setRequestHeader( 'X-CUSTOM', 'HEADER' ); xhr.withCredentials = true;

} );

This seems to be a pretty common case and it does not require lots of code, so I would consider adding an option for it. WDYT?

Change History (1)

comment:1 Changed 9 years ago by Jakub Ś

Status: newconfirmed
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