Giter VIP home page Giter VIP logo

Comments (5)

hansmbakker avatar hansmbakker commented on September 22, 2024 1

Hi, I currently cannot validate this quickly but thank you for the update, will test it later!

from azure-functions-dotnet-worker.

fabiocav avatar fabiocav commented on September 22, 2024

It isn't part of the current plan, but something we need to evaluate as it wouldn't be difficult to do.

I'll leave this open so we can continue the discussion and define a scope for what would be exposed.

from azure-functions-dotnet-worker.

fabiocav avatar fabiocav commented on September 22, 2024

@hansmbakker an update: this should be supported with the latest preview we've published (preview5). Tools for that are currently being validated for deployment.

from azure-functions-dotnet-worker.

kshyju avatar kshyju commented on September 22, 2024

@hansmbakker This should be working. Here is a quick sample for your reference.

[Function("GetItemsFromBlob")]
public HttpResponseData Run(
     [HttpTrigger(AuthorizationLevel.Function, "get", Route ="items/{itemId}")] HttpRequestData req,
     [BlobInput("samples-workitems/{ItemId}.txt", Connection = "MyStorageConnString")] string blob
    )
{
    var response = req.CreateResponse(HttpStatusCode.OK);
    response.Headers.Add("Content-Type", "text/plain; charset=utf-8");

    response.WriteString($"Blob content: {blob}");

    return response;
}

This sample is reading the itemId value from the http request URL and use that for getting the blob input entry. For example if you issue a request like /api/items/foo, "foo" will be bound to the ItemId segment of the route and the blob input binding will try to get the "foo.txt" file from the "sample-workitems" container.

Let us know if you run into any issues.

from azure-functions-dotnet-worker.

 avatar commented on September 22, 2024

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

from azure-functions-dotnet-worker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.