Add properties and metadata support for the blobs #2452
opekhovskiy-zf
started this conversation in
Ideas
Replies: 1 comment
-
Alternative will be Azure Blob storage library for C++ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Current implementation doesn't have ability to send blobs with properties and metadata.
The changes provided in the patch allow to add properties and metadata before the blob upload.
Unfortunately each blob doesn't have its handle where all info can be aggregated (like message has IOTHUB_MESSAGE_HANDLE, that is indeed the structure).
So this solution doesn't add the handle for the blob, but requires properties and metadata are being set by calling IoTHubDeviceClient_SetBlobProperty and IoTHubDeviceClient_SetBlobMetadata functions before IoTHubDeviceClient_UploadToBlobAsync or IoTHubDeviceClient_UploadMultipleBlocksToBlobAsync call.
Prefixes x-ms-blob- and x-ms-meta- are automatically appended.
Unsupported symbols in property or metadata name are replaced with '_' symbol.
Metadata values are url-encoded.
Properties and metadata are sent as two separate http-requests after successful blob upload.
This patch doesn't add changes to the tests.
This solution is single-threaded.
Changes were added to lts_07_2022 branch.
Add-blob-properties.zip
Beta Was this translation helpful? Give feedback.
All reactions