| @@ -57,8 +57,8 @@ func ObsHasObject(path string) (bool, error) { | |||||
| return hasObject, nil | return hasObject, nil | ||||
| } | } | ||||
| func GetObsPartInfos(uuid string, uploadID string) (string, error) { | |||||
| key := strings.TrimPrefix(path.Join(setting.BasePath, path.Join(uuid[0:1], uuid[1:2], uuid, uuid)), "/") | |||||
| func GetObsPartInfos(uuid, uploadID, fileName string) (string, error) { | |||||
| key := strings.TrimPrefix(path.Join(setting.BasePath, path.Join(uuid[0:1], uuid[1:2], uuid, fileName)), "/") | |||||
| output, err := ObsCli.ListParts(&obs.ListPartsInput{ | output, err := ObsCli.ListParts(&obs.ListPartsInput{ | ||||
| Bucket: setting.Bucket, | Bucket: setting.Bucket, | ||||
| @@ -542,7 +542,7 @@ func GetSuccessChunks(ctx *context.Context) { | |||||
| log.Error("GetPartInfos failed:%v", err.Error()) | log.Error("GetPartInfos failed:%v", err.Error()) | ||||
| } | } | ||||
| } else { | } else { | ||||
| chunks, err = storage.GetObsPartInfos(fileChunk.UUID, fileChunk.UploadID) | |||||
| chunks, err = storage.GetObsPartInfos(fileChunk.UUID, fileChunk.UploadID, fileName) | |||||
| if err != nil { | if err != nil { | ||||
| log.Error("GetObsPartInfos failed:%v", err.Error()) | log.Error("GetObsPartInfos failed:%v", err.Error()) | ||||
| } | } | ||||
| @@ -355,10 +355,9 @@ export default { | |||||
| xhr.open('PUT', url, false); | xhr.open('PUT', url, false); | ||||
| xhr.setRequestHeader('Content-Type', '') | xhr.setRequestHeader('Content-Type', '') | ||||
| xhr.send(e.target.result); | xhr.send(e.target.result); | ||||
| var etagValue = xhr.getResponseHeader('etag'); | |||||
| var etagValue = xhr.getResponseHeader('ETag'); | |||||
| //console.log(etagValue); | //console.log(etagValue); | ||||
| etags[currentChunk] = etagValue; | etags[currentChunk] = etagValue; | ||||
| console.log(etagValue) | |||||
| } | } | ||||
| async function updateChunk(currentChunk) { | async function updateChunk(currentChunk) { | ||||