Hi All,
I’m just starting with Transloadit and I’m having trouble uploading a video via a basic form. I can upload a photo no problem:
echo $transloadit->createAssemblyForm(array(
'params' => array(
'steps' => array(
'resize' => array(
'robot' => '/image/resize',
'width' => 200,
'height' => 100,
)
),
'redirect_url' => $redirectUrl
)
));
But I’m having trouble with the syntax when trying to change the following code to work with the form:
$response = $transloadit->createAssembly([
"files" => $files,
"params" => [
"template_id" => "MY_TEMPLATE_ID",
]
]);
How do I change the above code to work with createAssemblyForm and include the ‘redirect_url’ => $redirectUrl parameter? This is the code I’ve tried:
$redirectUrl = sprintf(
'http://%s%s',
$_SERVER['HTTP_HOST'],
$_SERVER['REQUEST_URI']
);
echo $transloadit->createAssemblyForm(array(
'params' => array(
'template_id' => 'MY_TEMPLATE_ID'
),
'redirect_url' => $redirectUrl,
));
But I get the error: Error: input[name=params] does not include a redirect_url
Thanks
Ian