Hello @Krithick Kalyan T ,
welcome to this moderated Azure community forum.
You tell you use the Azure portal to manipulate devices registered within the Azure IoT Hub.
You have been able to connect an Edge device (a special kind of IoT Hub device) so you should understand it is build up in modules.
Where a regular 'direct internet connected' IoT device can be manipulated using its device twin (using eg. desired properties, reported properties, direct method, cloud message) an Azure IoT Edge device does not have these abilities.
It's the modules, each with their module twin that can be manipulated with their desired properties, reported properties, and direct methods.
So, if you want to send a file to an Azure IoT Edge device using the Azure IoT hub in the portal, you need to manipulate one of the modules running inside that edge device.
What you need is:
- a (custom) module
- access to the operating system for that module
- a way to trigger a file download by the module
- preventing cloud access to the file marked for download
I'm not aware if there are of-the-shelf modules available capable of reading a file from the cloud. I expect you need to write one yourself.
How can you send a file to a module?
Putting a file inside a desired property is not feasible due to the limited 32KB size available in a module twin.
A direct method can be used up to 128 KB.
I recommend putting the file in eg. an Azure Storage blob container and sending the file path over a desired property.
The module receives the module twin change event and downloads the file.
then, you need to provide your custom module access to the operating system because containers normally run 'sandboxed'.
This can be done with a 'bind' as seen in this blog post.
There is one more thing to think about, securing cloud access to the file.
You can provide the security credentials for the container in the desired properties. A better way is to use a SAS token for granting limited access to the file, living in the storage container.
I understand that there are quite a few steps needed before a file can be uploaded but this is how it can be done, at scale, for any size and secure.
If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.