Skip to content

Commit 44edcfd

Browse files
author
wqingzhang
committed
图片上传时处理兼容覆盖原图,不检查Etag
1 parent 8276a1e commit 44edcfd

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

include/request/data_process_req.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,12 @@ class PutImageByFileReq : public PutObjectByFileReq {
601601
PutImageByFileReq(const std::string& bucket_name,
602602
const std::string& object_name,
603603
const std::string& local_image)
604-
: PutObjectByFileReq(bucket_name, object_name, local_image) {}
604+
: PutObjectByFileReq(bucket_name, object_name, local_image) {
605+
// 图片上传时处理可能会覆盖原图,本地文件etag与上传到COS的etag文件的etag可能不一致
606+
// 这种情况是合理的,所以这里不需要检查etag
607+
TurnOffComputeConentMd5();
608+
TurnOffCheckETag();
609+
}
605610

606611
virtual ~PutImageByFileReq() {}
607612

0 commit comments

Comments
 (0)