RubaXa jquery.fileapi setting preview el class -



RubaXa jquery.fileapi setting preview el class -

it possible set dynamically class of element contain preview of file based of file type? illustration image file have:

preview:{"width":100,"height":100,"el":".image-div-class"}...

and txt file have

preview:{"width":100,"height":100,"el":".text-div-class"}...

thank you

to append not image files type different div need use:

preview:{"width":100,"height":100,"el":".image-div-class""get": function ($el, file) { $el.appendto(".file-type-'+file.name.split('.').pop()+'").append("<p>"+file.name+"</p>");; }}

jquery fileapi

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -