How would you send a file over post?
pedroadame opened this issue · 1 comments
pedroadame commented
Given the following JSON body I must match:
msg: {
body: "test",
attachments: [att1, att2...]
}
And headers: {'Content-Type' => 'multipart/form-data'}
How do I have to write my code to send attachments?
Tried f1 = File.open(dir)
and putting f1
into attachments
: doesn't work.
templeman15 commented
@pedroadame posted an answer over here: