Can I submit mixed data using form? For example multiple files and text field data?
html parameter content:
<form action=" http://<servername>:<portnumber>/sdpapi/request/<Request ID>/attachments "
method="post" enctype="multipart/form-data">
<input type="hidden" name="OPERATION_NAME" value="UPLOAD" />
<input type="hidden" name="TECHNICIAN_KEY" value="<Technician Key>" />
<input type="hidden" name="format" value="json" />
<input type="file" name="attachment" />
<input type="submit" name="submit" value="upload" />
</form>
Uploading: image.png(1)…
How to implement it in n8n?
Hey @Hao_Tan , this is not supported by the HTTP Request node unfortunately. You would need to run custom code in the Function node to make a multipart/form-data
request as described here:
Hey @Kirst , sorry for the late response.
Ok the first example, the one with axios, will never get to the console.log as you are calling an async function without the await keyword. The function is returning before the HTTP request responds.
With regard to the second example, it will not work either because the request library do not return a promise and the keyword await as far as I know works when the function you are calling return a promise. To make work you have to either require request-p…