Hey can someone help i am sending post api request to external with file from my laravel app file folder which is under my public 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_POSTFIELDS, array('myFile'=>"@$samplefile",'token'=>$token,'id'=>1)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $postResult = curl_exec($ch); curl_close($ch);
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2euDUon
via IFTTT
Aucun commentaire:
Enregistrer un commentaire