mirror of
https://github.com/tickstep/aliyunpan.git
synced 2025-01-23 22:42:15 +08:00
fix upload url renew bug
This commit is contained in:
parent
b63320ec54
commit
4b5a7e9f07
@ -100,7 +100,7 @@ func (pu *PanUpload) UploadFile(ctx context.Context, partseq int, partOffset int
|
||||
}
|
||||
if isUrlExpired(uploadUrl) {
|
||||
// get renew upload url
|
||||
infoList := make([]aliyunpan.FileUploadPartInfoParam, len(pu.uploadOpEntity.PartInfoList))
|
||||
infoList := make([]aliyunpan.FileUploadPartInfoParam, 0)
|
||||
for _,item := range pu.uploadOpEntity.PartInfoList {
|
||||
infoList = append(infoList, aliyunpan.FileUploadPartInfoParam{
|
||||
PartNumber: item.PartNumber,
|
||||
@ -184,6 +184,11 @@ func (pu *PanUpload) UploadFile(ctx context.Context, partseq int, partOffset int
|
||||
Terminated: true,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
respError = uploadTerminate
|
||||
respErr = &uploader.MultiError{
|
||||
Terminated: true,
|
||||
}
|
||||
}
|
||||
return resp, respError
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user