@tarojs/taro-h5 3.5.0-alpha.13 → 3.5.0-alpha.14

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.
@@ -9,6 +9,7 @@ const createDownloadTask = ({ url, header, success, error }) => {
9
9
  progressUpdate: new CallbackManager()
10
10
  };
11
11
  xhr.open('GET', url, true);
12
+ xhr.withCredentials = true;
12
13
  xhr.responseType = 'blob';
13
14
  setHeader(xhr, header);
14
15
  xhr.onprogress = e => {
@@ -11,6 +11,7 @@ const createUploadTask = ({ url, filePath, formData = {}, name, header, timeout,
11
11
  progressUpdate: new CallbackManager()
12
12
  };
13
13
  xhr.open('POST', url);
14
+ xhr.withCredentials = true;
14
15
  setHeader(xhr, header);
15
16
  for (formKey in formData) {
16
17
  form.append(formKey, formData[formKey]);
@@ -51,6 +51,7 @@ export const convertObjectUrlToBlob = url => {
51
51
  const xhr = new XMLHttpRequest();
52
52
  xhr.open('GET', url, true);
53
53
  xhr.responseType = 'blob';
54
+ xhr.withCredentials = true;
54
55
  xhr.onload = function () {
55
56
  if (this.status === 200) {
56
57
  resolve(this.response);
package/dist/index.cjs.js CHANGED
@@ -2603,6 +2603,7 @@ const convertObjectUrlToBlob = url => {
2603
2603
  const xhr = new XMLHttpRequest();
2604
2604
  xhr.open('GET', url, true);
2605
2605
  xhr.responseType = 'blob';
2606
+ xhr.withCredentials = true;
2606
2607
  xhr.onload = function () {
2607
2608
  if (this.status === 200) {
2608
2609
  resolve(this.response);
@@ -2625,6 +2626,7 @@ const createDownloadTask = ({ url, header, success, error }) => {
2625
2626
  progressUpdate: new CallbackManager()
2626
2627
  };
2627
2628
  xhr.open('GET', url, true);
2629
+ xhr.withCredentials = true;
2628
2630
  xhr.responseType = 'blob';
2629
2631
  setHeader(xhr, header);
2630
2632
  xhr.onprogress = e => {
@@ -2894,6 +2896,7 @@ const createUploadTask = ({ url, filePath, formData = {}, name, header, timeout,
2894
2896
  progressUpdate: new CallbackManager()
2895
2897
  };
2896
2898
  xhr.open('POST', url);
2899
+ xhr.withCredentials = true;
2897
2900
  setHeader(xhr, header);
2898
2901
  for (formKey in formData) {
2899
2902
  form.append(formKey, formData[formKey]);