jquery - acceptFileTypes Blueimp fileupload -
i have implemented jquery fileupload, have small issue accepted file types:
$('#fileupload'). url: '/upload/uploaddoc', // url zum file upload type: 'post', datatype: 'json', uploadtemplate: 'template-upload', acceptfiletypes: /^.*\.(?!exe$|lnk$)[^.]+$/i, maxfilesize:allowed_file_size ....... }
i using regex recognize filetypes not allowed. want pass variable contains accepted file types in maxfilesize not seem accept lists , strings.
do know passed acceptfiletypes ?
you may use regexp
constructor.
something like:
acceptfiletypes: new regexp("^.*\\." + my_condition_lookahead + "[^.]+$", "i"),
note need double escape special regex meta characters when declaring regex using constructor notation.
Comments
Post a Comment