Forums Issues

Cannot get Automatic encode to work

Subscribe to Cannot get Automatic encode to work 7 posts, 2 voices

 
Avatar systemaddict 11 posts

I upload videos with a code like this:

$ch = curl_init("http://heywatch.com/upload");
curl_setopt($ch, CURLOPT_POSTFIELDS,
    array(    'data'=>"@$uploadfile",
            'key'=>'xxxxxx',,
            'your_site_user_id'=>'xx',
            'post_id'=>'xxx'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$postResult = curl_exec($ch);
curl_close($ch);

The file is uploadet to Heywatch. However, I can’t get it to encode automatically although this is enabled in the options-page (username: sermitsiaq).

 
Avatar Bruno Celeste 374 posts

If you do the same thing on the site directly, ie upload a video via the upload form, is the encode starting?

 
Avatar systemaddict 11 posts

Yes, it works perfectly when uploaded through the upload form.

 
Avatar Bruno Celeste 374 posts

In that case, there is something wrong with your request. What is your code exactly? Is there another parameter you didn’t mentioned above?

 
Avatar systemaddict 11 posts

This is weird. I tried to include a custom parameter like:

‘message’=>‘Whatever…..’,

I removed that and now it works.

 
Avatar systemaddict 11 posts

Ah, f… – I think it’s because I didn’t urlencode the value. Thanks for pointing me in the right direction.

 
Avatar Bruno Celeste 374 posts

Glad it works now.

Forums Issues