Interacting with Azure Edge Devices through ThingWorx > Event for File Uploads from the Edge
Event for File Uploads from the Edge
File uploads from edge devices use the support provided by Azure IoT. The high-level process follows:
1. The edge device uses an Azure IoT SDK to implement file uploads to a blob-storage container in an Azure IoT Hub.
2. The ThingWorx Azure IoT Hub Connector receives a notification for a file upload from the EventHub endpoint reserved for the Connector.
3. The Connector determines which device completed the upload and triggers an event on the ThingWorx Platform with information about the file.
The event that is triggered on the ThingWorx Platform is called FileTransfer. This event uses the FileTransferJob Data Shape, but only some of its fields, adjusted for information provided by Azure. If you have used the Copy service of the ThingWorx FileTransferSubystem, you will note that this is the same event that is fired for the Copy service.
The FileTransferJob Data Shape provides the following fields for an upload from an Azure IoT device, based on the information provided from Azure:
Field
Value
isComplete
true
state
VALIDATED
size
<file size>
targetRepository
<AzureStorageContainerFileRepository Thing name>
targetFile
<name of file>
targetPath
<directory>
endTime
<file last-updated time>
sourceRepository
<edge device-id>