I am using php curl to upload pdf document using in dr chrono using api/documents. Actually I am not clear on how to pass my pdf file so that it gets uploaded.
Here is my params array
$handle = fopen('pdfsPatientInformation_1446467593.pdf', 'r');
$myfile = fgets($handle);
$docParams = array('doctor' => 7891,'patient' => 58001561,'description' =>'Patient Medical History Form','date' => '2015-02-11','document' => $myfile);
I am getting error
{"document":["The submitted data was not a file. Check the encoding type on the form."]}
Please can you help me with an answer.