Closed wuyuewei closed 4 years ago
GetObjectRequest request(BucketName, ObjectName); auto outcome = client.GetObject(request); if (outcome.isSuccess()) { std::cout << "getObjectToBuffer" << " success, Content-Length:" << outcome.result().Metadata().ContentLength() << std::endl; /打印下载内容/ std::string content; *(outcome.result().Content()) >> content; std::cout << "getObjectToBuffer" << "content:" << content << std::endl; }
this example only suit to files,but how to download a pic into memory?
char ch[100]; *(object.result().Content()) >> ch;
thank you
GetObjectRequest request(BucketName, ObjectName); auto outcome = client.GetObject(request); if (outcome.isSuccess()) {
std::cout << "getObjectToBuffer" << " success, Content-Length:" << outcome.result().Metadata().ContentLength() << std::endl; /打印下载内容/ std::string content; *(outcome.result().Content()) >> content; std::cout << "getObjectToBuffer" << "content:" << content << std::endl; }
this example only suit to files,but how to download a pic into memory?