Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
25 Days of Serverless
public static async Task Run([BlobTrigger(_containerName)] CloudBlockBlob blockBlob, ILogger log)
log.LogInformation("Validating Gift Image is a PNG");
if (blockBlob.Name.EndsWith(".png", StringComparison.InvariantCultureIgnoreCase))
log.LogInformation("Confirmed PNG");
log.LogInformation($"Photo {blockBlob.Name} is not a PNG");
log.LogInformation($"Deleting {blockBlob.Name} from container");
await blockBlob.DeleteAsync().ConfigureAwait(false);
log.LogInformation($"Deleted {blockBlob.Name}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment