Azure Blob Connection
FOR PLATFORM-SUPPORTED CONTENT
Please see in the Mendix documentation for details.
FOR COMMUNITY-SUPPORTED CONTENT
Module is useful for pushing files to Azure Blob storage. This is also useful to read the content of a file from the blob storage
Typical usage scenario
There are some use cases where files are to be pushed to a container in Azure Blob Storage account. This module helps to push the file to particular content you configure as part of this module.
Features and limitations
- Easily configurable for particual blob storage account
- Configurable service principle details
- Just pass the file which is to be pushed into the microflow.
- Sample page to upload the file which can be pushed. Logic to push files can be reused based on the requirements.
- [Mendix modeler version] : 8.3.1 or above
- [Other dependencies: E.g. modules, jars, images, styles etc.][ No
- Mendix Studio Pro 8.3.1 (or higher)
- Community commons module
- Azure Blob storage account
- Client ID and secret of a service principal
Steps to add into project:
- Import the module package in your Mendix project. You might need to resolve the layout ("Atlas_Topbar")
Change the value of constants API_ClientID, API_TenantId and API_ClientSecret to the appropriate value for your service principal.
Change the value for AZR_AccountName and AZR_containerName with your storage account name and container name from the azure portal.
Assign the Administrator module role to the appropriate user roles in Project Security (e.g. assign it to your Administrator/Configurator user role)
Add Rest_Calls page into Navigation
Start the application.
- Put file into Azure Blob Storage
When you navigate to Rest_Calls page , you will be able to see two buttons. Click on 'Upload File to Blob' button. It will show a popup to upload file just like below.
Browse the file you want to upload to Azure Blob storage.
If there is any error, it will be shown in mendix modeller console just like one of the exception below:
If its success, success popup appears in the application and file will be pushed to Azure Blob storage account as shown below:
2. Get File content from Blob:
If we want to read file from blob storage, we can make use of Act_Blob_GET_API microflow.
Change the variable(Filename) to the name of the file which you want to read from Azure Blob. You can also change the microflow to get the string from the front end.
When you navigate to Rest_Calls page , you will be able to see two buttons. Click on 'Get File Details from Blob' button. You will be able to read the content in console as below:
- CommunityCommons module