I'm referring to the Blog Post by Pratap Ladhani https://powerapps.microsoft.com/en-us/blog/custom-api-for-image-upload/
At the start of the blog, he mentions how to create an Azure API App. I had a look in Azure and couldn't find s similar screen (understandable as Azure changes really quickly).
Where do I start to make this Azure API App? Is it from here?
Or is it from here?
If it isn't obvious I have no clue how to proceed, and I was hoping that I could follow that blog and be able to make it happen.
I need this functionality for two reasons:
1. To be able to store Images somewhere in order for them to be accessible in Galleries in the App which will be shared by several Users.
2. I would like to build an App that does Expense Claims and I would like the Users to be able to upload images of receipts.
Any guidance will be greatly appreciated.
As you want to make a Azure API app, please try to start from the second picture. From the document you have provided, we know that a Azure API App is being selected. Please try the steps to create a Azure API App.
Hi @UB400 please see here for an alternative in SharePoint:
If you need the actual jpeg, you just need to convert the base64 string to bytes.
The following article will help you understand how to get started with Azure API Apps:
Hope it helps!
@pratapladhani thank you very much for the guidance. What i gleaned from reading the article you linked to was very valuable, and in the end I downloaded your files and was able to make the API.
However I ran into an issue. While the Image gets uploaded to Azure blob storage, it does not show in the Gallery as per your example. As I had only got to the testing stage , I'm still running it without authentication and what i've noticed is that the URL stored in the Collection and that gets displayed in the gallery has ?sv=xxxx etc appended after the .jpg. Is that the authentication string that gets passed on to Azure, as I suspect that is the reason it's not displaying the image.
I tried pasting the url into a browser and it returned an authentication error, removing the string of characters after the .jpg shows the image in the browser.
Will adding authentication resolve the issue?
@pratapladhani I did some more testing. I switched on authentication, on the Azure side. Then when creating the new custom sonnection, I tried using the json file that was created earlier without authentication, however when I tried to select an authentication option for creating the custom connection, the drop down does not show any authentication option, only "no authentication". Please advise.
I found workaround to this was to just comment out/delete the "+ sasBlobToken" bit on line 96 of UploadImageController.cs in Visual Studio.
That gets rid of the authentication token on the uploaded image. I'm sure that's very hacky and removes a security layer but for my PoC it does the job nicely.
@jmiller thanks for sharing. Does your "hack" retain some level of "Security" i.e. does it only allow authorised Users, or is it the same as leaving it open without any Security whatsoever?
We have a less complex approach now, see the blog post on how to save files and lock them down with the updated Azure Blob Storage connector: https://powerapps.microsoft.com/en-us/blog/upload-files-from-powerapps-using-the-azure-blob-storage-...
Keep your eyes open for our upcoming T-shirt design contest!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020