Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: simon.wilbyThis is very similar to the box.com post request in that that expected multipart/form-data content.
you want to put the following into the ContentType parameter:
multipart/form-data; boundary=-------------------------acebdf13572468
I'm assuming the post request doesn't require authentication but that would go into the Header parameter if required.
The request body would go into the Input-Body field. you'll need to build the "Body" in a filter node prior to the http node to create new lines successfully.
so it would look something like this in a filter node (assuming that filename is coming from an input pin called filename, the content of the file is from an input called RawData)
boundary = "---------------------------acebdf13572468"
body_string = "\r\n"
+ "Content-Disposition: form-data; "
+ "name=\""
+ filename
+ "\""
+ "; filename=\""
+ filename
+ "\"\r\n"
+ "Content-Type: text/plain\r\n\r\n"
+RawData
+"\r\n"
+left(boundary, strlen(boundary) - 2)
+ "--"
+ "\r\n"
emit body_string
let me know if that's not clear enough and I can modify the graph I have to something a little clearer