You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-hub/iot-hub-python-python-file-upload.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ This article shows how to use the [file upload capabilities of IoT Hub](iot-hub-
22
22
23
23
The [Send telemetry from a device to an IoT hub](quickstart-send-telemetry-python.md) quickstart demonstrates the basic device-to-cloud messaging functionality of IoT Hub. However, in some scenarios you cannot easily map the data your devices send into the relatively small device-to-cloud messages that IoT Hub accepts. When you need to upland files from a device, you can still use the security and reliability of IoT Hub.
24
24
25
-
At the end of this tutorial you run the Python console app:
25
+
At the end of this tutorial, you run the Python console app:
26
26
27
27
***FileUpload.py**, which uploads a file to storage using the Python Device SDK.
28
28
@@ -52,7 +52,7 @@ In this section, you create the device app to upload a file to IoT hub.
52
52
pip install azure.storage.blob
53
53
```
54
54
55
-
1. Create a test file that you will upload to blob storage.
55
+
1. Create a test file that you'll upload to blob storage.
56
56
57
57
1. Using a text editor, create a **FileUpload.py** file in your working folder.
58
58
@@ -161,17 +161,17 @@ In this section, you create the device app to upload a file to IoT hub.
161
161
#loop.close()
162
162
```
163
163
164
-
This code creates an asynchronous **IoTHubDeviceClient** and uses the the following APIs to manage the file upload with your IoT hub:
164
+
This code creates an asynchronous **IoTHubDeviceClient** and uses the following APIs to manage the file upload with your IoT hub:
165
165
166
-
* **get_storage_info_for_blob** gets information from your IoT hub about the linked Storage Account you created previously. This includes the hostname, container name, blob name and a SAS token. This information is passed to the **store_blob** function (in the previous step), so the **BlobClient** in that function can authenticate with Azure storage. The **get_storage_info_for_blob** method also returns a correlation_id, which is used in the **notify_blob_upload_status** method. The correlation_id is IoT Hub's way of marking which blob you are working on.
166
+
* **get_storage_info_for_blob** gets information from your IoT hub about the linked Storage Account you created previously. This information includes the hostname, container name, blob name, and a SAS token. The storage info is passed to the **store_blob** function (created in the previous step), so the **BlobClient** in that function can authenticate with Azure storage. The **get_storage_info_for_blob** method also returns a correlation_id, which is used in the **notify_blob_upload_status** method. The correlation_id is IoT Hub's way of marking which blob you're working on.
167
167
168
168
* **notify_blob_upload_status** notifies IoT Hub of the status of your blob storage operation. You pass it the correlation_id obtained by the **get_storage_info_for_blob** method. It's used by IoT Hub to notify any service that might be listening for a notification on the status of the file upload task.
169
169
170
170
1. Save and close the **UploadFile.py** file.
171
171
172
172
## Run the application
173
173
174
-
Now you are ready to run the application.
174
+
Now you're ready to run the application.
175
175
176
176
1. At a command prompt in your working folder, run the following command:
0 commit comments