Skip to content

File browser plugin should allow for setting custom HTTP headers #643

Closed
@jswiderski

Description

Are you reporting a feature or a bug?

Feature

Check if the issue is already reported

Provide detailed reproduction steps (if any)

Uploading dropped files allows for creating cross-origin AJAX requests by adding custom HTTP requests.

Unfortunately this is not possible in the File Browser plugin.

This is caused by the File Browser plugin currently using a standard <form> element that is submitted upon clicking the "Send it to the Server" button.

Mouse cursor over the "Send it to the Server" button

Solution

We'll implement an additional upload method for the File Browser plugin that uses XMLHttpRequest through the File Tools plugin.

The new upload method could be enabled using the config.filebrowserUploadMethod property.

The old method using the plain <form> element will still be supported as it is required by old browsers.

For 4.8.x, the <form>element will still be used by default since we cannot make backward incompatible changes in a minor release. Early adopters will already be able to enable it by setting:

config.filebrowserUploadMethod = 'xhr';

The default behavior will be changed in version 4.9.0 (#1365).

Browser Compatibility

All officially supported browsers except Internet Explorer 8 and 9.

The new feature will not be compatible with IE8 and IE9 as there is no Form Data type available there. These browsers will, however, gracefully fall back to the old <form>-based solution. As a result no custom headers will be sent, but the editor will still attempt to upload the file.

Other details

As stated in ticket https://dev.ckeditor.com/ticket/13791, it will probably be easier to create a new plugin then redesign the existing one.

  • Browser: Any
  • OS: Any
  • CKEditor version: 4.0+
  • Installed CKEditor plugins: filebrowser

Activity

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

Metadata

Assignees

No one assigned

    Labels

    plugin:filebrowserThe plugin which probably causes the issue.status:confirmedAn issue confirmed by the development team.supportAn issue reported by a commercially licensed client.target:minorAny docs related issue that can be merged into a master or major branch.type:featureA feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions