Closed djosemartine closed 3 years ago
Hi @djosemartine , thanks for the feedback! Would you mind elaborating a bit more on your scenario so we can better understand the limitation? What "enrichment" are you thinking of when it comes to the file upload notification? Thanks!
@djosemartine, thank you for your contribution to our open-sourced project! Please help us improve by filling out this 2-minute customer satisfaction survey
Hi @elhorton, thanks for writing back. I closed the issue by mistake but I could reopen it again. Let me explain better the feature request:
The Device Client does not support to add metadata to the files to be uploaded. It would be very helpful if the upload-to-blob method had an option to set the file metadata, something like:
uploadToBlob(blobName: string, blobMetadata: Map<string, string>, stream: Stream, streamLength: number): Promise<void>;
The metadata is really useful to process the file once it is uploaded.
What do you think?
Please, forget about the enrich option. I think that is out of the scope of the SDK. Thanks in advance
got it, thanks @djosemartine ! That makes sense, and agreed that the enrich option is unfortunately outside the scope of the SDK. Adding metadata is feasible-- I've added it to our feature backlog and will keep this issue updated as we evaluate this in the new year.
Hi @djosemartine, taking a look at this issue. We have an API for more fine grained use of the uploadToBlob. See the example: https://github.com/Azure/azure-iot-sdk-node/blob/master/device/samples/upload_to_blob_advanced.js
Because it's just getting the information from IoT hub to communicate with the storage blob api it gives you more control over using custom metadata.
This is something that would just go in your application logic.
This is something that would just go in your application logic.
It works. Thanks
It would be very convenient to allow the devices to set custom metadata to the uploaded file. Some options that cross my mind:
thoughts?