Closed Bribin closed 8 years ago
What have you tried? Have you tried the example in the readme?
$Cataloguefile = $request->file('file'); $rand = rand ( 1 , 10000 ); $path = asset('/catalogue/'); CloudConvert::file($Cataloguefile)->convert( $path.$rand.'.jpg');
this is my code. i tried same as example .
Hmm, it's not the same as the example. You need to provide a callback url, it says this in the readme.
When the conversion might take a long time you could use:
# Script: send_conversion.php
CloudConvert::file('/a/path/to/file.mov')
->callback('http://myserver.com/save_file.php')
->convert('mp4');
# Script save_file.php
CloudConvert::useProcess($_REQUEST['url'])
->save('/path/converted.mp4');
$rand = rand ( 1 , 10000 ); $path = asset('/catalogue/pdf/'); CloudConvert::file($Cataloguefile)->callback('http://myproject.dev/dashboard/AddCatalogue/save') ->convert( $path.$rand.'.jpg');
this is callback request
public function catelogueSave() { $path = asset('/catalogue/pdf/'); $rand = rand ( 1 , 10000 ); CloudConvert::useProcess($_REQUEST['url'])->save($path.$rand.'.jpg'); }
thanks for your help
It won't work with local dev URLs, because the CloudConvert servers need to be able to make a request to it. If you upload it to a live site it will work
oke. thanks you
Im using this package in my laravel project. how i can create a callback request from laravel