8
0
Marek Lewandowski 6 лет назад
Родитель
Сommit
78c8276a5c

+ 20 - 1
packages/ckeditor5-upload/docs/features/base64-upload-adapter.md

@@ -24,7 +24,7 @@ Use the editor below to see the adapter in action. Open the web browser console
 
 First, install the [`@ckeditor/ckeditor5-upload`](https://www.npmjs.com/package/@ckeditor/ckeditor5-upload) package:
 
-```bash
+```plaintext
 npm install --save @ckeditor/ckeditor5-upload
 ```
 
@@ -48,6 +48,25 @@ Once enabled in the plugin list, the Base64 image upload adapter works out–of
 	Read more about {@link builds/guides/integration/installing-plugins installing plugins}.
 </info-box>
 
+## Configuration
+
+### Configuring allowed file types
+
+The allowed file types that can be uploaded should actually be configured in two places:
+
+* On the client side, in CKEditor 5, restricting image upload through the CKEditor 5 UI and commands.
+* On the server side, in your server configuration.
+
+#### Client-side configuration
+
+Use the {@link module:image/imageupload~ImageUploadConfig#types `image.upload.types`} configuration option to define the allowed image MIME types that can be uploaded to CKEditor 5.
+
+By default, users are allowed to upload `jpeg`, `png`, `gif`, `bmp`, `webp` and `tiff` files, but you can customize this behavior to accept, for example, SVG files.
+
+#### Server-side configuration
+
+It is up to you to implement any filtering mechanisms on your server in order to restrict the types of images that are allowed to be uploaded.
+
 ## What's next?
 
 Check out the comprehensive {@link features/image-upload Image upload overview} to learn more about different ways of uploading images in CKEditor 5.

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

@@ -22,7 +22,7 @@ See the [Server–side configuration](#server-side-configuration) section to lea
 
 First, install the [`@ckeditor/ckeditor5-upload`](https://www.npmjs.com/package/@ckeditor/ckeditor5-upload) package:
 
-```bash
+```plaintext
 npm install --save @ckeditor/ckeditor5-upload
 ```
 
@@ -73,6 +73,23 @@ ClassicEditor
 	.catch( ... );
 ```
 
+### Configuring allowed file types
+
+The allowed file types that can be uploaded should actually be configured in two places:
+
+* On the client side, in CKEditor 5, restricting image upload through the CKEditor 5 UI and commands.
+* On the server side, in your server-side application configuration.
+
+#### Client-side configuration
+
+Use the {@link module:image/imageupload~ImageUploadConfig#types `image.upload.types`} configuration option to define the allowed image MIME types that can be uploaded to CKEditor 5.
+
+By default, users are allowed to upload `jpeg`, `png`, `gif`, `bmp`, `webp` and `tiff` files, but you can customize this behavior to accept, for example, SVG files.
+
+#### Server-side configuration
+
+It is up to you to implement any filtering mechanisms on your server in order to restrict the types of images that are allowed to be uploaded.
+
 ## Server-side configuration
 
 To use this upload adapter, you must provide a server–side application that will handle the uploads and communicate with the editor, as described in the following sections.