add withCredentials param for upload req

This commit is contained in:
itellyou 2022-01-24 17:26:27 +08:00
parent 1f61b2d5c1
commit 1d97f980de
1 changed files with 3 additions and 1 deletions

View File

@ -45,6 +45,7 @@ class Uploader implements UploaderInterface {
onUploading,
onSuccess,
onError,
withCredentials,
crossOrigin,
headers,
} = this.options;
@ -80,7 +81,8 @@ class Uploader implements UploaderInterface {
data: formData,
contentType: this.options.contentType,
type: this.options.type || 'json',
crossOrigin: crossOrigin,
withCredentials,
crossOrigin,
headers: headers,
success: (response: any) => {
if (onSuccess) onSuccess(response, file);