CMB2 icon indicating copy to clipboard operation
CMB2 copied to clipboard

Is it possible only allow to upload videos?

Open tennessine opened this issue 4 years ago • 2 comments

How to limit user select only videos and How to preview video

tennessine avatar Jan 22 '22 20:01 tennessine

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.

tw2113 avatar Jan 24 '22 15:01 tw2113

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

rawsta avatar Jun 09 '22 14:06 rawsta