I have simple form in the dashboard that lets me select and upload a file.
<form action="/save-csv" id="convert" method="POST" enctype="multipart/form-data">
<div class="form-group">
<label style="font-weight: 500">
Select CSV file:
</label>
<div class="custom-file">
<input id="file-input" type="file" name="file" accept=".csv" onclick="this.value=null;" class="custom-file-input" />
<label class="custom-file-label" for="file-input">- select file -</label>
</div>
</div>
<div class="form-group" style="btn-orange">
<input type="submit" class="md-raised md-button md-ink-ripple" value="Convert" style="width:100%" />
</div>
</form>
[{"id":"b1ca907d.8b7da","type":"http in","z":"8e883159.0b4bc","name":"","url":"/save-csv","method":"post","upload":true,"swaggerDoc":"","x":220,"y":1440,"wires":[["19201004.c4496","2156a9b9.5d0d06"]]},{"id":"19201004.c4496","type":"http response","z":"8e883159.0b4bc","name":"","statusCode":"","headers":{},"x":810,"y":1440,"wires":[]},{"id":"2156a9b9.5d0d06","type":"debug","z":"8e883159.0b4bc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":390,"y":1400,"wires":[]},{"id":"b2cc0eef.f39a6","type":"comment","z":"8e883159.0b4bc","name":"how do I save or use the file's contents here?","info":"","x":530,"y":1440,"wires":[]}]
How do I save the file uploaded using the form above locally in Node-RED?
I want it to be saved temporarily so I can feed its contents later into the flow using the file-in node.
Also, I am requested to do this using only the built-in nodes so I can't use custom nodes.
Initially, I was looking into extracting the file contents from the http request's multipart data but it seems I would need to use custom nodes to accomplish it.
I am quite new to this so I might be looking into this problem incorrectly. Any advice, suggestion, or even a completely different kind of solution is appreciated. Thank you in advance for your help.