Skip to content

Feature Request: Blob Binding (out): Set Metadata Properties Like CacheControl and ContentType #1664

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

Open
ricklove opened this issue Jul 10, 2017 · 1 comment

Comments

@ricklove
Copy link

ricklove commented Jul 10, 2017

It would be handy to be able to set metadata properties for Blobs like Cache-Control and Content-Type.

Known workarounds

It is required to use the SDK for creating blobs that require custom metadata property values.

Related information

Perhaps a "propeties" value could be added to the json for out blob.

To Set the Value Statically with Functions.json
{
    "name": "outputBlob",
    "type": "blob",
    "direction": "out",
    "path": "{container}/{blob}",
    "connection": "AZURE_STORAGE_CONNECTION_STRING",
    "properties": {
        "cacheControl": "public, max-age 86400",
        "contentType": "application/json",
        "contentEncoding": "gzip"
    }
}
To Set the Value at Runtime:
context.bindings.outputBlob = {data: '...'};
context.bindingsMetadata.outputBlob.properties = {contentType:'application/json'}; 
@christopheranderson
Copy link
Contributor

This needs a partner issue on the Blob Storage Binding in SDK to expose this feature on the binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants