filestack / filestack-php

Official PHP SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://www.filestack.com
Apache License 2.0
56 stars 32 forks source link

bad request on executing the download #53

Open Krison13425 opened 3 years ago

Krison13425 commented 3 years ago

{ try{ $products = new UploadModel(); $data = $products->find($id); $decode_data = json_decode($data->json); $client = new FilestackClient($decode_data->cilent);

    $destination = 'uploads/'.$data->pdf;
    $result =  $client->download($decode_data->filelink->handle,$destination);
}
catch (FilstackException $e){
    echo $e->getMessage();
    echo $e->getCode();
}   
}