Closed bachras closed 8 years ago
@bachras Please check out this closed issue: https://github.com/robbiepaul/cloudconvert-laravel/issues/12
The S3 uploading is handled by CloudConvert, therefore needs to be configured before the conversion process starts. The callback will simply be a notification that the process is complete
Thanks for prompt response. I have read that closed issue and I am a bit confused. As far as I understand callback is not required when file is saved on S3? Is that right? I will try to use this code other day as I already reached my limit on testing. Is it right?
public function postSendPost() {
$files = $request->file("file");
foreach($files as $file){
$rand = rand ( 1 , 10000 );
CloudConvert::file($file)->callback('https://mywebsite.com/feed/completeVideoConversion')
->convert(CloudConvert::s3($rand.'.mp4'));
}
}
How I will be notified that file is saved on S3?
Thanks again.
You're right callback is not required for saving to S3.
However if you want to be notified when the process is complete and CloudConvert has uploaded the file to your S3 bucket then include a callback URL. So in your case it would be something like
public function postSendPost() {
$files = $request->file("file");
foreach($files as $file){
$rand = rand ( 1 , 10000 );
CloudConvert::file($file)->callback('https://mywebsite.com/feed/completeVideoConversion')
->convert(CloudConvert::S3($rand.'.mp4'));
}
}
and in your callback URL
public function getCompleteVideoConversion() {
// Any logic you like to let your application know $_REQUEST['url'] process is complete
}
File saving works perfectly fine now, but callback URL is not requested. For testing purposes I am trying to insert entry into database and it is not happening.
Could you advise me on this please? Thanks
Have you got a route set up correctly?
Does a database entry get inserted when you manually visit https://mywebsite.com/feed/completeVideoConversion?url=testing
?
Route is set up correctly as I already tried to visit same URL before via browser and it was inserting properly and getting parameters from URL. Do you know want could be wrong? Did you try youself? Does it work for you?
Thanks
Please run another update and see if it fixes your issue
It is working now. Thank you for your help, I really appreciate that.
No problem, thanks for reporting it
I am trying to use non-blocking conversion, but it does not seem to work for me. Could you help me? Here is the code I am using:
I have checked that process is created and I am able to download the file via the download url from cloudconvert server, but is not saving on S3.
Thanks for your help in advance.