Forum Discussion
LeonBam
Feb 09, 2023Copper Contributor
Files from IoTHub in storage are not JSON
Hello,
In my IotHub, I defined entrypoint for storage.
While I see that the files are arrive successfully, the type of them is not JSON and I defied.
The content is JSON, but the extension is empty and not JSON as I used to have.
What can i define wrong this time?
Thanks
3 Replies
- harry_liouCopper ContributorIn my python case,
Should use get_storage_info_for_blob function with extension:
storage_info = await device_client.get_storage_info_for_blob("folder/file.json")
FYR- LeonBamCopper Contributor
I will add images to clarify my case:
Here is one definition:
Here what I see now:
I am missing the json extension, whereas the content is really new-line delimited json, same as above.
- LeonBamCopper ContributorI found what I defined wrong. When using az cli, for creating route endpoint
az iot hub routing-endpoint create , the --file-name-format should contains also the extension.
I expected from it to use the --encoding parameter for this, but I had to add it myself.