Hi!
I’m trying to attach an audio file to an activity but I am keep getting Invalid multipart payload format
error response. Request example:
The same request works in postman, could you help me?
Hi!
I’m trying to attach an audio file to an activity but I am keep getting Invalid multipart payload format
error response. Request example:
Hi @Alexander
Welcome to the community
Can you share the complete error message? The following snippet should work fine with Unirest
var unirest = require('unirest');
var req = unirest('POST', 'https://api.pipedrive.com/v1/callLogs/<call_log_id>/recordings')
.headers({
'Accept': 'application/json',
'Authorization': 'Bearer <Token>'
})
.attach('file', 'audio.wav')
.end(function (res) {
if (res.error) console.log(res.error);
console.log(res.raw_body);
});
Hi @Shubham
One of the nifty features of our Postman collection is that it also generates runtime specific code snippets -
would this help ? Let me know
@Hem actually I know that postman provides code for the request however , I don’t want to upload a single file , but multiple files to different deals , so I have to make it dynamic , so I don’t want to use postman since it includes cookies