How to give validation for video
This is an open discussion with 4 replies, filed under General.
Search
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.
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.