fixed javascript for uploading videos