How to upload a file using http request

Hi Community,
I'm new to node red and I'm trying to upload a file in the Http request, It is looking different from doing in postman,
Any help or guidance would be invaluable

Did you try out any of the flow examples here: Library - Node-RED

Or check out the forum: Search results for 'http request file upload order:latest' - Node-RED Forum

Hi @Steve-Mcl ,

Thanks for your Suggestion,

I have found a thread for file upload scenario

Which has given me a path to resolve this as below

var base64Data = msg.encodedFile;
var buffer = Buffer.from(base64Data, 'base64');

var formData = {
    file: {
        value: buffer,
        options: {
            filename: `${msg.fileName}`,
            contentType:`${msg.fileType}`
        }
    },
}

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.