I am using CKFinder V3 with PHP Connector, currently I am using command:send
and ImageInfo
to retrieve image information as width and height at server side, example:
this._ckFinder.request('command:send', {
name: 'ImageInfo',
folder: file.get('folder'),
params: { fileName: file.get('name') }
})...
Currently I need to use a similar approach for video, specially I need to retrieve video with/height and I could not find any reference in the doc, I would like to know:
I am aware that is possible to use HTML5 to get some meta information after a video has been inserted in the DOM example. But I rather prefer a server side solution any other ideas is welcome.
Unfortunately CKFinder does not process videos out of the box. In order do that you should develop such thing by your own. This would consist:
So just add a plugin that will add such custom command on server, ie VideoInfo
. Then on the client side call it as other commands:
finder.request( 'command:send', {
name: 'VideoInfo',
folder: file.get( 'folder' ),
params: {
fileName: file.get( 'name' )
}
} ).done( function( response ) {
// Process the response
} );
Also check API docs for 'command:send' request.