Hello, I am trying to use the Azure Blob Storage Node,
I can get it to upload a file to a folder, how I want, if I statically type in the values into the 'Storage Blob Name' section. However the problem is I want these to be dynamic.
How would I go about making these dynamic and using properties on my message payload?
Note, in the screenshot above, I tried using the handlebars syntax, as isa common replacement in other things I am familiar with, but that did not work. It just made a folder name {{msg.devicename}} and a file within that named {{msg.filename}}.
If msg.devicename = XYZ, and msg.filename = "data.json", I want it to place a folder named XYZ, and a file named data.json.
The package I am using is: node-red-contrib-azure-blob-storage
I think I figured it out.
So it seems like it uses whatever the path of the file is, at msg.payload. The slight problem with that is that when you have the file on your 'in my case' linux system, I could not imagine how that file path translates up into the Azure Blob.
so msg.payload becomes both the file that is uploaded, as well as the intended filename.
What ended up working is setting the filename to upload to be...:
devicename\filename.json
Those are the wrong slashes for Linux, so instead of creating it in a nested folder, it just creates a file literally named: devicename\filename.json
(Not sure if the double slashes are required).
Then when this particular node goes to upload it to Azure, it parses that, sees the slashes, and puts it into the proper folder structure on Azure Blob Storage.
So in my case, that 'Storage Blob Name' is blank now, and it is being pulled from msg.payload.
That, as well as the slash confusion between a Linux and a Windows system is what caused problems.
Thank you guys for replying, I was not sure if I was just missing something obvious in the Node Properties configuration or not.