My application allows users to take photos. These photos are stored in Azure Blob Storage. They also can view and delete the photos they have taken.
The question I have is around Deleting the file. Here is the basic code:
//storageAccount = "/saName"
//photoContainer = "/1/421/3/18"
//PhotoId = "3"
With(
{
blobId:
AzureBlobStorage.GetFileMetadataByPathV2(
storageAccount,
$"{photoContainer}{pPath}/{PhotoId}.jpg"
).Id
},
If(
IsBlank( blobId ),
UpdateIf(
ctxIHSSaveState,
Id = 1,
{
error: 2
}
);
AzureBlobStorage.DeleteFileV2(
storageAccount,
blobId,
{SkipDeleteIfFileNotFoundOnServer:true}
)
)
)
The call to GetFileMetadataByPathV2() works and returns the Blob Id. The call to DeleteFileV2() does not throw an error. When I look in the container after the delete the file is still there. Soft Deletes are off. I would expect that the file would be gone after a delete, or at least have some kind of flag indicating it was deleted. Are my expectations wrong? What should be happening?
Thank you.