fix oss: got 403 in TestContinueStreamAppendLarge

Signed-off-by: tgic <farmer1992@gmail.com>
This commit is contained in:
tgic
2015-07-04 23:53:00 +08:00
parent 9627c6c5a5
commit 2a8535626f
3 changed files with 10 additions and 6 deletions

View File

@@ -492,7 +492,7 @@ func (d *driver) WriteStream(ctx context.Context, path string, offset int64, rea
// currentLength >= offset >= chunkSize
_, part, err = multi.PutPartCopy(partNumber,
oss.CopyOptions{CopySourceOptions: "bytes=0-" + strconv.FormatInt(offset-1, 10)},
d.Bucket.Name+"/"+d.ossPath(path))
d.Bucket.Path(d.ossPath(path)))
if err != nil {
return 0, err
}
@@ -586,7 +586,7 @@ func (d *driver) WriteStream(ctx context.Context, path string, offset int64, rea
// offset > currentLength >= chunkSize
_, part, err = multi.PutPartCopy(partNumber,
oss.CopyOptions{},
d.Bucket.Name+"/"+d.ossPath(path))
d.Bucket.Path(d.ossPath(path)))
if err != nil {
return 0, err
}