Guidance for downloading documents from REST API [PHP]
Collapse
X
-
I found a solution and opened a PR for a fix in the PHP class: https://github.com/espocrm/documentation/pull/709 -
Guidance for downloading documents from REST API [PHP]
Hi all, seeking some advise please.
I have an application which is a dashboard and external document portal, extending an instance of a CRM.
When I call through the API to get files, it works just fine in Postman, but I'm not sure how to store the file correctly as PHP treats my assignment as a failure:
The code inside the if statement is never executed. However, I can load the doc in a Postman test.PHP Code:if($file = $client->request('GET', 'Attachment/file/'.$document['fileId'])){ echo "test"; }
(https://docs.espocrm.com/development...t/#downloading)

Any guidance is appreciated.Last edited by barontech; 08-23-2021, 10:49 PM.Tags: None

Leave a comment: