From 49f13b9b9018d89650e0daf036b3fb5a9e364ce5 Mon Sep 17 00:00:00 2001 From: foxxorcat <95907542+foxxorcat@users.noreply.github.com> Date: Mon, 24 Apr 2023 19:13:33 +0800 Subject: [PATCH] fix(baidu_photo): upload file has web prefix (close #4233 in #4235) --- drivers/baidu_photo/driver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/baidu_photo/driver.go b/drivers/baidu_photo/driver.go index 794a6fea..ecb756da 100644 --- a/drivers/baidu_photo/driver.go +++ b/drivers/baidu_photo/driver.go @@ -249,7 +249,7 @@ func (d *BaiduPhoto) Put(ctx context.Context, dstDir model.Obj, stream model.Fil "isdir": "0", "rtype": "1", "ctype": "11", - "path": stream.GetName(), + "path": fmt.Sprintf("/%s", stream.GetName()), "size": fmt.Sprint(stream.GetSize()), "slice-md5": slice_md5, "content-md5": content_md5,