Not an issue, more of an approach to a problem I got into.
I have spent some time trying to figure out how to send an attachment along with custom fields without json encoding the whole array due the attachment getting not recognized:
Note: I have tried working with:
'attachments'=>array('attachment_url'=>$pathToFile,'content_type'=>$mimeType,'name'=>$fileName'
I kept getting the following error message:
Error Message: {"description":"Validation failed","errors":[{"field":"attachments","message":"Value set is of type key/value pair.It should be a/an Array","code":"datatype_mismatch"}]}
Not an issue, more of an approach to a problem I got into. I have spent some time trying to figure out how to send an attachment along with custom fields without json encoding the whole array due the attachment getting not recognized:
Note: I have tried working with:
'attachments'=>array('attachment_url'=>$pathToFile,'content_type'=>$mimeType,'name'=>$fileName'
I kept getting the following error message:
Error Message: {"description":"Validation failed","errors":[{"field":"attachments","message":"Value set is of type key/value pair.It should be a/an Array","code":"datatype_mismatch"}]}