1

In my scenario, the function needs to poll a remote service and when new item appears the function should upload a new file to blob storage. There is an example in the documentation of how to save data to blob storage Blob binding example in Node.js:

// Copy blob from input to output, based on a queue trigger
module.exports = function(context) {
    context.log('Node.js Queue trigger function processed', context.bindings.myQueueItem);
    context.bindings.myOutputBlob = context.bindings.myInputBlob;
    context.done();
};

But it is not clear how to specify a different name for the uploaded file?

Andrey M.
  • 3,688
  • 3
  • 33
  • 36

1 Answers1

2

Currently the name of the output blob is controlled by the WebJobs SDK you're running atop of. There's no IBinder exposed yet for JS to do this imperatively (like you can do for C#).

outblob

This is a better answer that links to the GitHub issue where the upcoming feature is being tracked.

evilSnobu
  • 24,582
  • 8
  • 41
  • 71
  • 2
    Thanks for the answer! I ended up not using output binding. Instead I use azure storage sdk to upload a file to blob storage. Not sure why would I want to use output binding if there is a complete SDK to work with blob storage. – Andrey M. Jun 19 '17 at 06:52
  • This is totally doable now via function.json, see updated docs at https://learn.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob#output – evilSnobu May 28 '19 at 11:11