8
0
Просмотр исходного кода

Docs: Added some extra information about server configuration when config.simpleUpload.withCredentials is used.

Aleksander Nowodzinski 5 лет назад
Родитель
Сommit
48d742cfa2
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      packages/ckeditor5-upload/docs/features/simple-upload-adapter.md

+ 3 - 1
packages/ckeditor5-upload/docs/features/simple-upload-adapter.md

@@ -62,7 +62,7 @@ ClassicEditor
 			// The URL that the images are uploaded to.
 			uploadUrl: 'http://example.com',
 
-			// Enable XMLHttpRequest.withCredentials property
+			// Enable the XMLHttpRequest.withCredentials property.
 			withCredentials: true,
 
 			// 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.
 
+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.
 
 ### Successful upload