@zyzgroup/core-web 0.0.87 → 0.0.88

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.
@@ -2967,6 +2967,8 @@ class Rc {
2967
2967
  uploadURL;
2968
2968
  // 要上传的文件
2969
2969
  file;
2970
+ // 本地文件 MD5 hash
2971
+ fileHash;
2970
2972
  // 文件切割块大小
2971
2973
  chunkSize;
2972
2974
  // 文件总切割数量
@@ -2982,18 +2984,12 @@ class Rc {
2982
2984
  onTime;
2983
2985
  onProgress;
2984
2986
  onComplete;
2985
- // 本地文件 MD5 hash
2986
- fileHash;
2987
2987
  constructor(t) {
2988
2988
  this.axios = new ih({
2989
2989
  baseURL: t.baseURL,
2990
2990
  interceptor: {
2991
2991
  request: (e) => e,
2992
- requestError: (e) => {
2993
- },
2994
- response: (e) => (e.config.url == this.uploadURL && (this.onProgress?.(this.currentChunk++, this.chunks), this.end == this.file.size ? (this.isUploading = !1, this.stopTimeCount(), this.onComplete?.()) : this.isUploading && this.uploadChunk()), e),
2995
- responseError: (e) => {
2996
- }
2992
+ response: (e) => (e.config.url == this.uploadURL && e.status == 200 && (this.onProgress?.(this.currentChunk++, this.chunks), this.end == this.file.size ? (this.isUploading = !1, this.stopTimeCount(), this.onComplete?.()) : this.isUploading && this.uploadChunk()), e)
2997
2993
  }
2998
2994
  }), this.checkURL = t.checkURL, this.uploadURL = t.uploadURL, this.file = t.file, this.chunkSize = t.chunkSize || 1 * 1024 * 1024, this.chunks = Math.ceil(this.file.size / this.chunkSize), this.onTime = t.onTime, this.onProgress = t.onProgress, this.onComplete = t.onComplete;
2999
2995
  }