cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
vsslasd
Level: Powered On

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
Administrator
Administrator

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

adding in @EvanChakiMSFT to review. 

 

@TopShelf-MSFT 

Highlighted
PowerApps Staff EvanChakiMSFT
PowerApps Staff

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

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.

vsslasd
Level: Powered On

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

Thank you, Evan.

vsslasd
Level: Powered On

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

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,