I’m getting an invalid uri error when using the http node. I’m populating the URL like this:
{{$node["config"].json["api"]}}/api/v2/surveys-media/{{$json["encoded"]}}
The “encoded” uri is coming from a function node where I encodeURIComponent like this:
const att = $node.Webhook.json.body._attachments;
return att.map(att => ({
json: {
filename: att.filename,
encoded: encodeURIComponent(att.filename),
}
}));
And I am using auth - with a jwt header Authorization.
The error I’m getting is:
Error: RequestError: Error: Invalid URI "/api/v2/surveys-media/forms%2Fattachments%2Fd1d3db045a5042aeaa43dfc96ca2213f%2F8e628ad5-0d1e-423f-99e5-9f0e42fde003%2Fmaxresdefault-13_29_24.jpg"
at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/HttpRequest.node.js:762:27)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/src/WorkflowExecute.js:369:47
Has anyone run into this before?