I am sending post API request to external server with a PDF file from my laravel app files folder which is under my public folder inside Laravel app folder. i am sending PDF file from this folder and getting. file not found error can someone help.
$samplefile = "/var/www/html/laravel_project/public/1476505004.pdf";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"http://api_upload_usl/api/uploads");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS,array('myFile'=>"@$samplefile",'token'=>$token,'id'=>1));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$postResult = curl_exec($ch);
curl_close($ch);