Interacting with Azure Edge Devices through ThingWorx > Downloading Files to Azure IoT Devices
Downloading Files to Azure IoT Devices
To be able to download files to Azure IoT devices, be sure that you have created an AzureStorageContainerFileRepository Thing in ThingWorx that represents your Azure Blob Storage. Files that are stored in the Azure Blob Storage are visible from ThingWorx through the AzureStorageContainerFileRepository. You can request to download those files to Azure IoT devices. You can also store files in this AzureStorageContainerFileRepository in ThingWorx and request to download them to Azure IoT devices. Downloads can be requested through a mashup or ThingWorx Composer.
The AzureStorageContainerFileRepository Thing provides a service, called GenerateDirectDownloadUrl. This service takes a path to the file within the repository and an optional expiration date. If the expiration date is not provided, the service uses the current time plus one hour (the default expiration time). The returned URL contains all the necessary authentication as parameters and requires no special headers to function.