mirror of https://github.com/fantasticit/think.git
server: fix upload chunk
This commit is contained in:
parent
21966051a4
commit
ba60716390
|
@ -132,6 +132,7 @@ export class TencentOssClient extends BaseOssClient {
|
||||||
} else {
|
} else {
|
||||||
const uploadId = data.UploadId;
|
const uploadId = data.UploadId;
|
||||||
this.uploadIdMap.set(inOssFileName, uploadId);
|
this.uploadIdMap.set(inOssFileName, uploadId);
|
||||||
|
this.uploadChunkEtagMap.set(uploadId, []);
|
||||||
resolve(uploadId);
|
resolve(uploadId);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -161,9 +162,6 @@ export class TencentOssClient extends BaseOssClient {
|
||||||
if (err) {
|
if (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
} else {
|
} else {
|
||||||
if (!this.uploadChunkEtagMap.has(uploadId)) {
|
|
||||||
this.uploadChunkEtagMap.set(uploadId, []);
|
|
||||||
}
|
|
||||||
this.uploadChunkEtagMap.get(uploadId).push({
|
this.uploadChunkEtagMap.get(uploadId).push({
|
||||||
PartNumber: chunkIndex,
|
PartNumber: chunkIndex,
|
||||||
ETag: data.ETag,
|
ETag: data.ETag,
|
||||||
|
|
Loading…
Reference in New Issue