Skip to content

Commit 6717097

Browse files
committed
Edits
1 parent 6a968cc commit 6717097

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

includes/iot-hub-howto-file-upload-dotnet.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ The [ServiceClient](/dotnet/api/microsoft.azure.devices.serviceclient) class con
103103

104104
To receive file upload notification:
105105

106-
* Create a [CancellationToken](/dotnet/api/azure.core.httpmessage.cancellationtoken?#azure-core-httpmessage-cancellationtoken).
107-
* Call [GetFileNotificationReceiver](/dotnet/api/microsoft.azure.devices.serviceclient.getfilenotificationreceiver?#microsoft-azure-devices-serviceclient-getfilenotificationreceiver) to create a notification receiver.
108-
* Use a loop with [ReceiveAsync](/dotnet/api/microsoft.azure.devices.receiver-1.receiveasync?#microsoft-azure-devices-receiver-1-receiveasync(system-threading-cancellationtoken)) to wait for the file upload notification.
106+
* Create a [CancellationToken](/dotnet/api/azure.core.httpmessage.cancellationtoken?#azure-core-httpmessage-cancellationtoken)
107+
* Call [GetFileNotificationReceiver](/dotnet/api/microsoft.azure.devices.serviceclient.getfilenotificationreceiver?#microsoft-azure-devices-serviceclient-getfilenotificationreceiver) to create a notification receiver
108+
* Use a loop with [ReceiveAsync](/dotnet/api/microsoft.azure.devices.receiver-1.receiveasync?#microsoft-azure-devices-receiver-1-receiveasync(system-threading-cancellationtoken)) to wait for the file upload notification
109109

110110
```csharp
111111
using Microsoft.Azure.Devices;

includes/iot-hub-howto-file-upload-java.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ IotHubClientProtocol protocol = IotHubClientProtocol.MQTT;
4040
Instantiate the DeviceClient to connect to IoT hub using the Iot hub primary connection string and protocol parameters.
4141

4242
```java
43-
String connString = "IoT hub connection string";
43+
String connString = "{IoT hub connection string}";
4444
DeviceClient client = new DeviceClient(connString, protocol);
4545
```
4646

@@ -114,9 +114,14 @@ client.closeNow();
114114

115115
You can create a backend application to receive file upload notifications.
116116

117+
To create a file upload notification application:
118+
119+
* Connect to the IoT Hub service client
120+
* Check for a file upload notification
121+
117122
The [ServiceClient](/java/api/com.azure.core.annotation.serviceclient) class contains methods that services can use to receive file upload notifications.
118123

119-
### Connect the client to IoT hub
124+
### Connect to the IoT hub service client
120125

121126
Create a `IotHubServiceClientProtocol` object. The connection uses the `AMQPS` protocol.
122127

@@ -132,8 +137,8 @@ ServiceClient sc = ServiceClient.createFromConnectionString(connectionString, pr
132137

133138
To check for file upload status:
134139

135-
* Create a [getFileUploadNotificationReceiver](/java/api/com.microsoft.azure.sdk.iot.service.fileuploadnotificationreceiver) object.
136-
* Use [open](/java/api/com.microsoft.azure.sdk.iot.service.fileuploadnotificationreceiver?#com-microsoft-azure-sdk-iot-service-fileuploadnotificationreceiver-open()) to connect to IoT Hub.
140+
* Create a [getFileUploadNotificationReceiver](/java/api/com.microsoft.azure.sdk.iot.service.fileuploadnotificationreceiver) object
141+
* Use [open](/java/api/com.microsoft.azure.sdk.iot.service.fileuploadnotificationreceiver?#com-microsoft-azure-sdk-iot-service-fileuploadnotificationreceiver-open()) to connect to IoT Hub
137142
* Call [receive](/java/api/com.microsoft.azure.sdk.iot.service.fileuploadnotificationreceiver?#com-microsoft-azure-sdk-iot-service-fileuploadnotificationreceiver-receive()) to check for the file upload status. This method returns a [fileUploadNotification](/java/api/com.microsoft.azure.sdk.iot.service.fileuploadnotification) object. If an upload notice is received, you can view upload status fields using [fileUploadNotification](/java/api/com.microsoft.azure.sdk.iot.service.fileuploadnotification) methods.
138143

139144
For example:

includes/iot-hub-howto-file-upload-node.md

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,13 @@ throw new errors.ArgumentError('Invalid upload parameters');
6565

6666
### Upload the file to IoT hub
6767

68-
To upload a file from a device IoT hub:
68+
To upload a file from a device to IoT hub:
6969

70-
1. Create a stream pipeline.
71-
2. Construct the blob URL.
72-
3. Create a [BlockBlobClient](/javascript/api/@azure/storage-blob/blockblobclient) for file upload to Blob Storage.
73-
4. Call [uploadFile](/javascript/api/@azure/storage-blob/blockblobclient?#@azure-storage-blob-blockblobclient-uploadfile) to upload the file to Blob Storage.
74-
5. Call [notifyBlobUploadStatus](/javascript/api/azure-iot-device/client?#azure-iot-device-client-notifyblobuploadstatus) to notify IoT Hub that the upload succeeded or failed.
70+
1. Create a stream pipeline
71+
2. Construct the blob URL
72+
3. Create a [BlockBlobClient](/javascript/api/@azure/storage-blob/blockblobclient) for file upload to Blob Storage
73+
4. Call [uploadFile](/javascript/api/@azure/storage-blob/blockblobclient?#@azure-storage-blob-blockblobclient-uploadfile) to upload the file to Blob Storage
74+
5. Call [notifyBlobUploadStatus](/javascript/api/azure-iot-device/client?#azure-iot-device-client-notifyblobuploadstatus) to notify IoT Hub that the upload succeeded or failed
7575

7676
For example:
7777

@@ -127,7 +127,12 @@ await client.notifyBlobUploadStatus(blobInfo.correlationId, isSuccess, statusCod
127127

128128
You can create a backend application to check the IoT Hub service client for device file upload notifications.
129129

130-
### Connect to the IoT Hub service client
130+
To create a file upload notification application:
131+
132+
* Connect to the IoT hub service client
133+
* Check for a file upload notification
134+
135+
### Connect to the IoT hub service client
131136

132137
Create the [ServiceClient](/javascript/api/azure-iothub/client) using [fromConnectionString](/javascript/api/azure-iothub/client?#azure-iothub-client-fromconnectionstring).
133138

includes/iot-hub-howto-file-upload-python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Call [get_storage_info_for_blob](/python/api/azure-iot-device/azure.iot.device.i
6464

6565
```python
6666
# Get the storage info for the blob
67-
PATH_TO_FILE = "[Full path to local file]"
67+
PATH_TO_FILE = "{Full path to local file}"
6868
blob_name = os.path.basename(PATH_TO_FILE)
6969
blob_info = device_client.get_storage_info_for_blob(blob_name)
7070
```

0 commit comments

Comments
 (0)