robbiepaul / cloudconvert-laravel

A Laravel wrapper for the CloudConvert API
177 stars 34 forks source link

Symfony UploadedFile #48

Closed nomadme closed 7 years ago

nomadme commented 7 years ago

Thank you for the package.

How can I convert file using Symfony Uploaded file as an input and saving it somewhere else?

app('cloudconvert')->file($uploadedFile)->to('pdf', true)->save(storage_path())

Client error: GET https://host123d1qp.cloudconvert.com/download/~qPUuwEqiICsPI4AKiI1B-iUBtXY resulted in a 400 Bad Request response: {"error":"This process does not have any output files.","code":400}

robbiepaul commented 7 years ago

Please see the example in the README for using uploaded file

if (Input::hasFile('photo'))
{
    CloudConvert::file( Input::file('photo') )->to('/a/local/path/profile_image.jpg');
}