2

How can I get the URL of the BLOB which triggers the "BLOBTrigger"? Getting the name works with the {name} section but I also need the URL.

[FunctionName("Function1")]
        public static async Task RunAsync(
            [BlobTrigger("input/{name}", Connection = "AzureWebJobsStorage")] Stream myBlob,
            [Blob("output/{name}", FileAccess.Write, Connection = "AzureWebJobsStorage")] Stream outputBlob,
            string name,
            ILogger log)
        {
            
            log.LogInformation($"C# Blob trigger function Processed blob\n Name:{name}");
            //log.LogInformation("HERE I NEED THE URL");
            log.LogInformation("*******************----**********************");            
        }

Thanks for your help.

1 Answer 1

1

You can get input as CloudBlockBlob, then you can get the properties. Blob path is in the properties.

Sign up to request clarification or add additional context in comments.

2 Comments

I had already tried that before but I had trouble copying the new blob into another. After your post I tried again it's working. Thanks for your help.
@Miles Hi, If my answer answered your question, can you mark it as the answer to end this question? Thanks.:)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.