cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vsslasd
Advocate V
Advocate V

How to ensure a photo has been uploaded from PowerApps to Azure Blob Storage and also retrieved from Azure Blob Storage

We have the following command which uploads a photo, or multiple photos to Azure Blob Storage: 

If(Connection.Connected,
ForAll(Filter(FileUploads,ActiveStatus="New" || ActiveStatus="Changed"),
AzureBlobStorage.CreateBlockBlob("service/images",URLAddress,FileData2)));

 

How can we ensure that this is actually being saved ? 

 

In some cases, for some reason, it isn't saving.

1) We need to  know if it isn't saving, and it needs to try saving again or do some error handling to notify the user it hasn't saved. 

 

2) When trying to load the file from the URL, we get an error message if the photo doesn't exist at that URL:

If(Connection.Connected,
UpdateIf(FileUploads, ! IsBlank(URLAddress),
{
FileData2 : AzureBlobStorage.GetFileContentByPath("service/images/" & URLAddress,{})

}
));

 

We need to gracefully handle the Error Message on the Retrieval of a bad URL as well, as the handle the Error of the photo not saving in the first place. Both cases must be handled gracefully.

 

Thank you 

4 REPLIES 4
Anonymous
Not applicable

adding in @EvanChakiMSFT to review. 

 

@Anonymous 

EvanChakiMSFT
Power Apps
Power Apps

We have a feature that will help you grab errors like these that will be shipping in the next 2 months.  Once it ships we will have a blog post on how to capture the error.

Thank you, Evan.

Evan,

The update should also have a feature for determining if Orphaned Objects exist in Azure Blob, which do not exist in a database table, in addition to the appropriate error trapping.

Thank you,

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,293)