We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
With
import { readBuffer } from '@wrote/read' // returns a buffer export default async () => { const body = await readBuffer('style.css') context.res = { body, headers: { 'content-type': 'text/css', }, } }
and bindings
{ "disabled": false, "bindings": [ { "authLevel": "anonymous", "type": "httpTrigger", "route": "style.css", "direction": "in", "name": "req", "methods": [ "get" ] }, { "type": "http", "direction": "out", "name": "res" } ] }
my CSS file is served properly. When I change the bindings to use $return, I get served a buffer in serialised format:
$return
{ "type": "http", "direction": "out", "name": "$return" }
import { readBuffer } from '@wrote/read' // returns a buffer export default async () => { const body = await readBuffer('style.css') return { body, headers: { 'content-type': 'text/css', }, } }
{"type":"Buffer","data":[46,103,111,111]}
Azure Functions Core Tools (2.1.748 Commit hash: 5db2066) Function Runtime Version: 2.0.12134.0
The text was updated successfully, but these errors were encountered:
I've hit the same issue today trying to return an image from my function. $return didn't work with a body buffer, while changing it to res worked.
res
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
With
and bindings
my CSS file is served properly. When I change the bindings to use
$return
, I get served a buffer in serialised format:Azure Functions Core Tools (2.1.748 Commit hash: 5db2066)
Function Runtime Version: 2.0.12134.0
The text was updated successfully, but these errors were encountered: