Forum Discussion

supergeri's avatar
supergeri
Copper Contributor
Feb 28, 2022

BlobTrigger not working for any new directory I am adding to a blob

I am creating a blobTrigger on an existing Function App for a new folder (status/inbound/Received) on an existing blob as follows:

 public static class MyTrigger
    {

        [FunctionName("MyTrigger")]
        public static async Task Run([BlobTrigger("status" + "/" + "inbound" + "/" + "Received" + "/{name}", Connection = "AzureWebJobsStorage")] Stream myBlob, string name, ILogger log)
        {
            log.LogInformation($"Blob trigger MyTriggerfunction Name:{name} Size: {myBlob.Length} Bytes");
            try
            {
                log.LogInformation($"MyTrigger processing a request for blob name: {name}");
                
            }
            catch (Exception ex)
            {
                log.LogError("MyTrigger" + ex.ToString());
            }
        }

    }

When I drop a file into the folder Received nothing happens. When I look at the live logs nothing happens.

When I change the path to a folder that has been created already it works. It does not work whenever I add a new directory

No RepliesBe the first to reply