@@ -9,7 +9,7 @@ export interface DropzoneFullProps extends OverridableComponentProps {
9
9
* Probably one of the most important methods (callbacks).
10
10
* `onChange()` returns as first parameter an array of `ExtFile` objects,
11
11
* with at least the following structure:
12
- *
12
+ *
13
13
* ```jsx
14
14
* export type ExtFile =
15
15
* {
@@ -21,7 +21,7 @@ export interface DropzoneFullProps extends OverridableComponentProps {
21
21
* uploadStatus?: undefined | "uploading", "success", "error";
22
22
* }
23
23
* ```
24
- * This event is triggered when upload starts and when upload
24
+ * This event is triggered when upload starts and when upload
25
25
* finishes for each file in order to update the props on each ExtFile
26
26
*/
27
27
onChange ?: ( files : ExtFile [ ] ) => void ;
@@ -35,10 +35,10 @@ export interface DropzoneFullProps extends OverridableComponentProps {
35
35
/**
36
36
* The default implementation of accept
37
37
* checks the file's mime type or extension
38
- * against this list. This is a comma-separated
39
- * list of one or more file types, or unique file type specifiers,
38
+ * against this list. This is a comma-separated
39
+ * list of one or more file types, or unique file type specifiers,
40
40
* describing which file types to allow.
41
- * E.g.:
41
+ * E.g.:
42
42
* ```js
43
43
* acccept="image/*, application/pdf, .psd"
44
44
* ```
@@ -70,12 +70,12 @@ export interface DropzoneFullProps extends OverridableComponentProps {
70
70
*/
71
71
onClean ?: Function ;
72
72
/**
73
- * If true, the component will automatically remove non valid files when user
73
+ * If true, the component will automatically remove non valid files when user
74
74
* drops files or selects them from file dialog. This flag will only work if validation is active.
75
75
*/
76
76
autoClean ?: boolean ;
77
77
/**
78
- * When given, "clean" button will be visible and
78
+ * When given, "clean" button will be visible and
79
79
* every time user clicks the buttom it will trigger the default "clean operation":
80
80
* Remove non valid files.
81
81
* This flag will only work if validation is active.
@@ -90,6 +90,13 @@ export interface DropzoneFullProps extends OverridableComponentProps {
90
90
* and uploadOnDrop prop flag will not work.
91
91
*/
92
92
uploadConfig ?: UploadConfig ;
93
+
94
+ /**
95
+ * Will be set on the XHRequest.withCredentials property
96
+ * Default is false
97
+ */
98
+ withCredentials ?: boolean ;
99
+
93
100
/**
94
101
* If set, the component will simulate the upload operation by randomly
95
102
setting the upload status and message on each uploadable{" "}
@@ -113,7 +120,7 @@ export interface DropzoneFullProps extends OverridableComponentProps {
113
120
onUploadFinish ?: ( uploadedFiles : ExtFile [ ] ) => void ;
114
121
115
122
116
- /////////////// STYLING ///////////
123
+ /////////////// STYLING ///////////
117
124
//borderRadius?: string | number;
118
125
/**
119
126
* The background color for dropzone container.
@@ -124,16 +131,16 @@ export interface DropzoneFullProps extends OverridableComponentProps {
124
131
* The min height of the component.
125
132
* If the value is given in number format, "px" will be assumed
126
133
* @default "180px"
127
- *
128
- * examples:
134
+ *
135
+ * examples:
129
136
* "50vh"
130
137
* "20%"
131
138
* "40em"
132
139
* "1rem"
133
140
*/
134
141
minHeight ?: string | number ;
135
142
136
- ///////////////// LABEL ///////////////
143
+ ///////////////// LABEL ///////////////
137
144
/**
138
145
* The label to place when no files were selected
139
146
*/
@@ -203,7 +210,7 @@ export interface DropzoneFullProps extends OverridableComponentProps {
203
210
*/
204
211
disabled ?: boolean ;
205
212
//CLICKABLE
206
- /**
213
+ /**
207
214
* If false, the component will not be clickable. So, file dialog will not be opened.
208
215
* @default true
209
216
*/
@@ -237,15 +244,15 @@ export type FooterConfig = {
237
244
*/
238
245
allowedTypesLabel ?: boolean ;
239
246
/**
240
- *
247
+ *
241
248
*/
242
249
uploadProgressMessage ?: boolean ;
243
250
/**
244
- *
251
+ *
245
252
*/
246
253
uploadResultMessage ?: boolean ;
247
254
/**
248
- *
255
+ *
249
256
*/
250
257
noMissingFilesLabel ?: boolean ;
251
258
@@ -300,6 +307,7 @@ export const defaultDrozoneProps: DropzoneProps =
300
307
disabled : false ,
301
308
dropOnLayer : true ,
302
309
uploadConfig : { } ,
310
+ withCredentials : false ,
303
311
actionButtons : { } ,
304
312
header : true ,
305
313
footer : true ,
@@ -310,7 +318,7 @@ export const defaultDrozoneProps: DropzoneProps =
310
318
export const DEFAULT_BORDER_RADIUS = "8px" ;
311
319
312
320
313
- /*
321
+ /*
314
322
export interface AdvancedConfigItem {
315
323
style?: React.CSSProperties;
316
324
className?: string;
0 commit comments