0
votes

I'm trying to use the Java Azure IoT device client sdk (v1.2.28) to upload files to blob storage. The examples show how to do this with the .net sdk but it seems like the same methods in the DeviceClient class don't exist in the java sdk. Is it not possible yet with the java sdk?

https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-csharp-csharp-file-upload

1
It looks like MSFT was targeting the end of May release for this feature (one of the comments in the link above).darrickc
This got moved to a June release!darrickc

1 Answers

1
votes

I reviewed the javadocs of Azure IoT device SDK, as you said, there is not a method to upload file to blob storage.

Accoring to the document File uploads with IoT Hub and the related REST API Create File Upload Sas Uri, the feature is required the blob sas uri, so only using IoT device SDK for Java is not possible, you need to use Azure Storage Java SDK to generate a blob sas uri first to call the REST API to do it.

However, for the other feature to receive file upload notification, there are some classes of Azure IoT service SDK for Java to support, which include FileUploadNotification, FileUploadNotificationReceiver, etc.