|
@@ -62,7 +62,7 @@ ClassicEditor
|
|
|
// The URL that the images are uploaded to.
|
|
// The URL that the images are uploaded to.
|
|
|
uploadUrl: 'http://example.com',
|
|
uploadUrl: 'http://example.com',
|
|
|
|
|
|
|
|
- // Enable XMLHttpRequest.withCredentials property
|
|
|
|
|
|
|
+ // Enable the XMLHttpRequest.withCredentials property.
|
|
|
withCredentials: true,
|
|
withCredentials: true,
|
|
|
|
|
|
|
|
// Headers sent along with the XMLHttpRequest to the upload server.
|
|
// Headers sent along with the XMLHttpRequest to the upload server.
|
|
@@ -103,6 +103,8 @@ When the image upload process is initiated, the adapter sends a [`POST`](https:/
|
|
|
|
|
|
|
|
You can send additional [headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) along with the `XMLHttpRequest` to the upload server, e.g. to authenticate the user, using the {@link module:upload/adapters/simpleuploadadapter~SimpleUploadConfig#uploadUrl `config.simpleUpload.headers`} object.
|
|
You can send additional [headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) along with the `XMLHttpRequest` to the upload server, e.g. to authenticate the user, using the {@link module:upload/adapters/simpleuploadadapter~SimpleUploadConfig#uploadUrl `config.simpleUpload.headers`} object.
|
|
|
|
|
|
|
|
|
|
+If you use the {@link module:upload/adapters/simpleuploadadapter~SimpleUploadConfig#withCredentials `config.simpleUpload.withCredentials`} configuration, you may need some [extra HTTP headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) for the cross–site request to work properly.
|
|
|
|
|
+
|
|
|
The [`responseType`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType) of the request is always `json`. See the [Successful upload](#successful-upload) and [Error handling](#error-handling) sections to learn more.
|
|
The [`responseType`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/responseType) of the request is always `json`. See the [Successful upload](#successful-upload) and [Error handling](#error-handling) sections to learn more.
|
|
|
|
|
|
|
|
### Successful upload
|
|
### Successful upload
|