Hello,
I'm trying to upload contact's document via EspoCRM API v1.
The first thing I do is send POST fields to 'api/v1/Attachment'. My POST fields look like this:
File is being created but unfortunately, I don't get any response from API so I just don't know which ID should be assigned with the contact.
Any suggestions how to get new attachment's ID from API?
I'm trying to upload contact's document via EspoCRM API v1.
The first thing I do is send POST fields to 'api/v1/Attachment'. My POST fields look like this:
PHP Code:
CURLOPT_POSTFIELDS => json_encode(array(
'name' => $_FILES['file']["name"],
'publishDate' => date('Y-m-d'),
'type' => $_FILES['file']['type'],
'size' => $_FILES['file']['size'],
'file' => ',' . base64_encode(file_get_contents($_FILES['file']['tmp_name'])),
)),
Any suggestions how to get new attachment's ID from API?
Comment