@ckeditor/ckeditor5-upload 48.2.0-alpha.7 → 48.3.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,99 +1,99 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
5
  /**
6
- * @module upload/uploadconfig
7
- */
6
+ * @module upload/uploadconfig
7
+ */
8
8
  /**
9
- * The configuration of the {@link module:upload/adapters/simpleuploadadapter~SimpleUploadAdapter simple upload adapter}.
10
- *
11
- * ```ts
12
- * ClassicEditor
13
- * .create( {
14
- * simpleUpload: {
15
- * // The URL the images are uploaded to.
16
- * uploadUrl: 'http://example.com',
17
- *
18
- * // Headers sent along with the XMLHttpRequest to the upload server.
19
- * headers: {
20
- * ...
21
- * }
22
- * }
23
- * } );
24
- * .then( ... )
25
- * .catch( ... );
26
- * ```
27
- *
28
- * See the {@glink features/images/image-upload/simple-upload-adapter "Simple upload adapter"} guide to learn more.
29
- *
30
- * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
31
- */
9
+ * The configuration of the {@link module:upload/adapters/simpleuploadadapter~SimpleUploadAdapter simple upload adapter}.
10
+ *
11
+ * ```ts
12
+ * ClassicEditor
13
+ * .create( {
14
+ * simpleUpload: {
15
+ * // The URL the images are uploaded to.
16
+ * uploadUrl: 'http://example.com',
17
+ *
18
+ * // Headers sent along with the XMLHttpRequest to the upload server.
19
+ * headers: {
20
+ * ...
21
+ * }
22
+ * }
23
+ * } );
24
+ * .then( ... )
25
+ * .catch( ... );
26
+ * ```
27
+ *
28
+ * See the {@glink features/images/image-upload/simple-upload-adapter "Simple upload adapter"} guide to learn more.
29
+ *
30
+ * See {@link module:core/editor/editorconfig~EditorConfig all editor configuration options}.
31
+ */
32
32
  export interface SimpleUploadConfig {
33
- /**
34
- * The path (URL) to the server (application) which handles the file upload. When specified, enables the automatic
35
- * upload of resources (images) inserted into the editor content.
36
- *
37
- * Learn more about the server application requirements in the
38
- * {@glink features/images/image-upload/simple-upload-adapter#server-side-configuration "Server-side configuration"} section
39
- * of the feature guide.
40
- */
41
- uploadUrl: string;
42
- /**
43
- * [Headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) sent with the request to the server during the upload.
44
- * This is the right place to implement security mechanisms like authentication and
45
- * [CSRF](https://developer.mozilla.org/en-US/docs/Glossary/CSRF) protection.
46
- *
47
- * The value can be specified either as an object of key-value pairs or a callback function that returns such an object:
48
- *
49
- * ```ts
50
- * ClassicEditor
51
- * .create( {
52
- * simpleUpload: {
53
- * // Set headers statically:
54
- * headers: {
55
- * 'X-CSRF-TOKEN': 'CSRF-Token',
56
- * Authorization: 'Bearer <JSON Web Token>'
57
- * }
58
- *
59
- * // Or dynamically, based on the file:
60
- * headers: ( file ) => {
61
- * return {
62
- * 'X-File-Name': file.name,
63
- * 'X-File-Size': file.size
64
- * };
65
- * }
66
- * }
67
- * } );
68
- * ```
69
- *
70
- * Learn more about the server application requirements in the
71
- * {@glink features/images/image-upload/simple-upload-adapter#server-side-configuration "Server-side configuration"} section
72
- * of the feature guide.
73
- */
74
- headers?: Record<string, string> | ((file: File) => Record<string, string>);
75
- /**
76
- * This flag enables the
77
- * [`withCredentials`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials)
78
- * property of the request sent to the server during the upload. It affects cross-site requests only and, for instance,
79
- * allows credentials such as cookies to be sent along with the request.
80
- *
81
- * ```ts
82
- * ClassicEditor
83
- * .create( {
84
- * simpleUpload: {
85
- * withCredentials: true
86
- * }
87
- * } );
88
- * .then( ... )
89
- * .catch( ... );
90
- * ```
91
- *
92
- * Learn more about the server application requirements in the
93
- * {@glink features/images/image-upload/simple-upload-adapter#server-side-configuration "Server-side configuration"} section
94
- * of the feature guide.
95
- *
96
- * @default false
97
- */
98
- withCredentials?: boolean;
33
+ /**
34
+ * The path (URL) to the server (application) which handles the file upload. When specified, enables the automatic
35
+ * upload of resources (images) inserted into the editor content.
36
+ *
37
+ * Learn more about the server application requirements in the
38
+ * {@glink features/images/image-upload/simple-upload-adapter#server-side-configuration "Server-side configuration"} section
39
+ * of the feature guide.
40
+ */
41
+ uploadUrl: string;
42
+ /**
43
+ * [Headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) sent with the request to the server during the upload.
44
+ * This is the right place to implement security mechanisms like authentication and
45
+ * [CSRF](https://developer.mozilla.org/en-US/docs/Glossary/CSRF) protection.
46
+ *
47
+ * The value can be specified either as an object of key-value pairs or a callback function that returns such an object:
48
+ *
49
+ * ```ts
50
+ * ClassicEditor
51
+ * .create( {
52
+ * simpleUpload: {
53
+ * // Set headers statically:
54
+ * headers: {
55
+ * 'X-CSRF-TOKEN': 'CSRF-Token',
56
+ * Authorization: 'Bearer <JSON Web Token>'
57
+ * }
58
+ *
59
+ * // Or dynamically, based on the file:
60
+ * headers: ( file ) => {
61
+ * return {
62
+ * 'X-File-Name': file.name,
63
+ * 'X-File-Size': file.size
64
+ * };
65
+ * }
66
+ * }
67
+ * } );
68
+ * ```
69
+ *
70
+ * Learn more about the server application requirements in the
71
+ * {@glink features/images/image-upload/simple-upload-adapter#server-side-configuration "Server-side configuration"} section
72
+ * of the feature guide.
73
+ */
74
+ headers?: Record<string, string> | ((file: File) => Record<string, string>);
75
+ /**
76
+ * This flag enables the
77
+ * [`withCredentials`](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/withCredentials)
78
+ * property of the request sent to the server during the upload. It affects cross-site requests only and, for instance,
79
+ * allows credentials such as cookies to be sent along with the request.
80
+ *
81
+ * ```ts
82
+ * ClassicEditor
83
+ * .create( {
84
+ * simpleUpload: {
85
+ * withCredentials: true
86
+ * }
87
+ * } );
88
+ * .then( ... )
89
+ * .catch( ... );
90
+ * ```
91
+ *
92
+ * Learn more about the server application requirements in the
93
+ * {@glink features/images/image-upload/simple-upload-adapter#server-side-configuration "Server-side configuration"} section
94
+ * of the feature guide.
95
+ *
96
+ * @default false
97
+ */
98
+ withCredentials?: boolean;
99
99
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ckeditor/ckeditor5-upload",
3
- "version": "48.2.0-alpha.7",
3
+ "version": "48.3.0-alpha.0",
4
4
  "description": "Upload feature for CKEditor 5.",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "CKSource (http://cksource.com/)",
@@ -25,8 +25,8 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@ckeditor/ckeditor5-core": "48.2.0-alpha.7",
29
- "@ckeditor/ckeditor5-utils": "48.2.0-alpha.7"
28
+ "@ckeditor/ckeditor5-core": "48.3.0-alpha.0",
29
+ "@ckeditor/ckeditor5-utils": "48.3.0-alpha.0"
30
30
  },
31
31
  "files": [
32
32
  "dist",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.css"],"names":[],"mappings":";;;;;;AAEA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["\n\n/*# sourceMappingURL=index.css.map */"]}