How to use mp4 in uploadfield

Silverstripe 4.5

How can I add .mp4 as an extension for the uploadfield? I always get the error “Extension mp4 is not allowed”.

Have you tried anything so far? It can be helpful if you could post some code.

Have a quick look through the following post about adding SVGs to the allowed file types:

It should be a case of adding the right file extension to the File class using YML as per that example. You may also need to check the server configuration to be sure that you don’t get limited by file size.

I changed it from an Image class to a File class and that worked.