Skip to content

Is it possible to manage custom mimetype to kind mapping? #3369

Discussion options

You must be logged in to vote

@LeonSebastianCoimbra Yes, you can do that by dynamically changing the members of your elFinder instance in JavaScript.

fm.bind('init', function() {
    fm.kinds['image/vnd.dxf'] = 'DXF';
    fm.messages['kindDXF'] = 'AutoCAD DXF';
});

By the way, "fm.kinds['image/vnd.dxf'] ='DXF';" It can be obtained from the fm.mimeTypes object, so in the next version we will be able to get it with only "fm.messages ['kindDXF'] ='AutoCAD DXF';".

Online demo: https://jsbin.com/dugoyil/edit?js,output

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@nao-pon
Comment options

@LeonSebastianCoimbra
Comment options

Answer selected by LeonSebastianCoimbra
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants