CMB2
CMB2 copied to clipboard
Is it possible only allow to upload videos?
How to limit user select only videos and How to preview video
I would check out https://github.com/CMB2/CMB2/wiki/Field-Types#file and/or https://github.com/CMB2/CMB2/wiki/Field-Types#file_list which includes arguments regarding previews and limiting by file type. I believe the query_args types may rely on mimetype.
Yep. i got it working via query_args and setting the correct mime-type.
'query_args' => [
'type' => [
'video/mp4',
'video/mpeg',
'video/x-mpeg',
'video/avi',
'video/msvideo',
'video/x-msvideo',
]
], // Only video attachment