# Video Uploader via Form

**URL:** <https://community.transloadit.com/t/video-uploader-via-form/15922>\
**Category:** Transloadit\
**Created:** [December 20, 2021, 9:54am UTC](https://community.transloadit.com/t/video-uploader-via-form/15922 "2021-12-20T09:54:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wildfox](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@wildfox](https://community.transloadit.com/u/wildfox)\
**Post date:** [December 20, 2021, 9:54am UTC](https://community.transloadit.com/t/video-uploader-via-form/15922/1 "2021-12-20T09:54:17Z")

</div>

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:

```auto
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:

```auto
$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:

```auto
$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
