@@ -54,10 +54,15 @@ bool ObjectOp::IsObjectExist(const std::string& bucket_name,
54
54
return false ;
55
55
}
56
56
57
- std::string ObjectOp::GetResumableUploadID (const std::string& bucket_name,
57
+ std::string ObjectOp::GetResumableUploadID (const PutObjectByFileReq& originReq,
58
+ const std::string& bucket_name,
58
59
const std::string& object_name) {
59
60
ListMultipartUploadReq req (bucket_name);
60
61
req.SetPrefix (object_name);
62
+ if (originReq.IsHttps ()) {
63
+ req.SetHttps ();
64
+ req.SetCaLocation (originReq.GetCaLocation ());
65
+ }
61
66
ListMultipartUploadResp resp;
62
67
63
68
std::string host = CosSysConfig::GetHost (GetAppId (), m_config->GetRegion (),
@@ -184,6 +189,10 @@ bool ObjectOp::CheckUploadPart(const PutObjectByFileReq& req,
184
189
185
190
while (!list_over_flag) {
186
191
std::string marker = StringUtil::IntToString (part_num_marker);
192
+ if (req.IsHttps ()){
193
+ list_req.SetHttps ();
194
+ list_req.SetCaLocation (req.GetCaLocation ());
195
+ }
187
196
list_req.SetPartNumberMarker (marker);
188
197
CosResult result = ListParts (list_req, &resp);
189
198
// Add to the parts_info;
@@ -553,7 +562,7 @@ CosResult ObjectOp::MultiUploadObject(const PutObjectByFileReq& req,
553
562
bool resume_flag = false ;
554
563
std::vector<std::string> already_exist_parts (kMaxPartNumbers );
555
564
// check the breakpoint
556
- std::string resume_uploadid = GetResumableUploadID (bucket_name, object_name);
565
+ std::string resume_uploadid = GetResumableUploadID (req , bucket_name, object_name);
557
566
if (!resume_uploadid.empty ()) {
558
567
resume_flag = CheckUploadPart (req, bucket_name, object_name,
559
568
resume_uploadid, already_exist_parts);
@@ -590,6 +599,10 @@ CosResult ObjectOp::MultiUploadObject(const PutObjectByFileReq& req,
590
599
591
600
CosResult init_result;
592
601
InitMultiUploadResp init_resp;
602
+ if (req.IsHttps ()) {
603
+ init_req.SetHttps ();
604
+ init_req.SetCaLocation (req.GetCaLocation ());
605
+ }
593
606
init_req.AddHeaders (req.GetHeaders ());
594
607
init_req.SetConnTimeoutInms (req.GetConnTimeoutInms ());
595
608
init_req.SetRecvTimeoutInms (req.GetRecvTimeoutInms ());
@@ -666,6 +679,10 @@ CosResult ObjectOp::MultiUploadObject(const PutObjectByFileReq& req,
666
679
comp_req.SetRecvTimeoutInms (req.GetRecvTimeoutInms () * 2 );
667
680
comp_req.SetEtags (etags);
668
681
comp_req.SetPartNumbers (part_numbers);
682
+ if (req.IsHttps ()) {
683
+ comp_req.SetHttps ();
684
+ comp_req.SetCaLocation (req.GetCaLocation ());
685
+ }
669
686
670
687
comp_result = CompleteMultiUpload (comp_req, &comp_resp);
671
688
// check crc64 if needed
0 commit comments