How to store Files to Microsoft Azure Storage using REST in Mendix

0
Hello All,   I want to use the Azure file storage system using an REST API with binary input What do you think the best practice is to get this done in Mendix? Thanks!
asked
2 answers
1

Using Azure blob storage, you have an API and can use SMB (think windows explorer).  You can make the storage not to require authenitcation (aunonymous access).  

 

The Blob API are is directly accessible over REST and you can upload files.  It really comes doesn to what secuirty you are trying to achieve.  For a simple solution where I want to work with storage, I would create a Lamda or Azure Function that exposes and a REST endpoint to read and write your file.  I'd then use a key (Client credential auth type).  This is a key that you keep same, use in the Lamda (pref from a secure store such as key vault on Azure) - to get it working skip the key vault storage of the key.

 

In the Lamda/Function pick you language and use the SDK to work with Azures blob storage, you can route, zip, check, scan, save et al in your custom logic and merely call the Lamda/function using a Menix flow to a REST API.

 

Azure Function using a SDK example - non compiled code super simple.

Radimaging Ltd - Paul Beck's Technical Working Notes for Microsoft Technology: Runas on Flows (pbeck.co.uk)Radimaging Ltd - Paul Beck's Technical Working Notes for Microsoft Technology: Runas on Flows (pbeck.co.uk)

 

Let me know if you need any help.

answered
0

Fn-AppInsightLogging.PNG

The image looks like it was lost, here is a really simple example of C# (no IDE needed but VS Code is much easier) of a C# function being exposed.

answered