Search

Hi, I want to give validation for video while uploading to server, is there any extension for video validation like image validation, how is it possible in symphony.

When you select "image" for the upload field it adds a regular expression that checks the file name. You should be able to simply modify this regular expression string to include video file extensions (flv, mpeg, avi etc) rather than jpeg, png and gif.

You can just change the validator for the Upload field and enter your own. Something like /.(?:mov|avi|webm|ogg|mp4)$/i would probably be a decent start, but it depends on your requirements in the end.

@anwarsidhu: You should check if using a third party (Youtube, Vimeo) to manage your videos since they will provide a better UI for your users to upload their videos. All encoding and sizing problem will disapear, and uploading large files via a normal POST could potentially result in a timeout or in a error if the file is too large. Do not try to re-invent the wheel if you can !

i had done this with

/.(?:mov|avi|webm|ogg|mp4)$/i

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details