Open dczaretsky opened 3 years ago
When uploading to azure blob an image via stream, it always sets the content type to "application/octet-stream". How do you change the content type when it is uploaded?
I've tried setting the meta content as follows:
vector<pair<string,string>> metadata(1, std::make_pair("Content-Type", "image/jpg")); client.upload_block_blob_from_stream(AZURE_BLOB_CONTAINER, filename, istream, metadata);
This only adds meta content, but doesn't change the blob properties. I've also tried to directly change the curl request headers:
auto bc = std::make_shared<blob_client>(account, 16); std::shared_ptr<azure::storage_lite::http_base> http_request = bc->client()->get_handle(); http_request->add_header("Content-Type", "image/jpg"); vector<pair<string,string>> metadata; bc->upload_block_blob_from_stream(AZURE_BLOB_CONTAINER, filename, istream, metadata);
Any help would be greatly appreciated.
@dczaretsky cpplite doesn't support this feature. I recommend you use our Track2 cpp sdk. https://github.com/Azure/azure-sdk-for-cpp/tree/master/sdk/storage
When uploading to azure blob an image via stream, it always sets the content type to "application/octet-stream". How do you change the content type when it is uploaded?
I've tried setting the meta content as follows:
This only adds meta content, but doesn't change the blob properties. I've also tried to directly change the curl request headers:
Any help would be greatly appreciated.