Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: How to actually use outbound blob binding in Azure Functions? #975

Closed
ctolkien opened this issue Nov 23, 2016 · 7 comments
Closed

Comments

@ctolkien
Copy link

ctolkien commented Nov 23, 2016

Here's the following blockers I've hit:

  • Using async so cannot use out params
  • Cannot return a Task<Stream> or Task<AnyMeaningfulCloudBlobTypes>, using $return binding. - Cannot bind parameter 'outputBlob' to type CloudBlockBlob. Make sure the parameter Type is supported by the binding. . All the documentation so far I've seen for this only return a Task<string> ?
  • Cannot use a CloudBlockBlob as an out binding and use methods like UploadFromStreamAsync(...) to write to it - Cannot bind blob to CloudBlockBlob using access Write.
  • CAN use a Stream or CloubBlobStream and then write to those streams - however, I have no way of setting the properties on the blob using these objects (for instance, I want to set the ContentType).

There appears to be no way of writing to a blob and setting properties using bindings? Do I have to drop down to directly using the .Net Azure storage api?

@ctolkien ctolkien changed the title Question: How to actually use outbound blob binding? Question: How to actually use outbound blob binding in Azure Functions? Nov 23, 2016
@fabiocav
Copy link
Member

fabiocav commented Nov 23, 2016

This lacks documentation, but in the integration tab, go to advanced and change the 'direction' of your blob binding to inout with that, you'll be able to bind to CloudBlockBlob and do what you need.

@mathewc
Copy link
Member

mathewc commented Nov 23, 2016

Related to #49. We need to prioritize making this easier to use, I agree. This issue keeps falling onto the back burner.

@lindydonna
Copy link
Contributor

Duplicate of #49, which is moved to an earlier milestone.

@nzigel
Copy link

nzigel commented Jul 10, 2017

How do you set the binding to inout if I am using the attributes in VS2017 preview and don't have a function.json file?

e.g. public static async Task Run([BlobTrigger("inputcontainer/{name}", Connection = "AzureWebJobsStorage")]CloudBlockBlob myBlob, [Blob("outputcontainer/{name}", Connection = "AzureWebJobsStorage")]CloudBlockBlob outputBlob, string name, TraceWriter log)

@lindydonna
Copy link
Contributor

@nzigel In the future, please open a new issue so it's not lost.

That example should automatically use inout. If it doesn't, that's a bug .

@gabrielcerutti
Copy link

CloudBlockBlob output binding is not working for me? is this supported today?

@mathewc
Copy link
Member

mathewc commented Sep 7, 2018

No there isn't an output binding to CloudBlockBlob. You could bind to CloudBlobContainer or CloudBlobDirectory and create blobs using the native SDK APIs.

@ghost ghost locked as resolved and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants