Closed tornako closed 5 years ago
@tornako we would recommend you the following code:
enableApi: true,
afterRender: function(listEl, parentEl, newInputEl, inputEl) {
var api = $.fileuploader.getInstance(inputEl);
if (inputEl.attr('data-apt') == 'logotip')
api.getOptions().disallowedExtensions = ['text/plain', 'audio/*'];
else
api.getOptions().disallowedExtensions = ['jpg', 'jpeg', 'png'];
},
Thanks, it's working!
:)
Hi,
I want to validate the extensions with a function because I have several forms of files and images, and depending on what is used, I must allow one extension or another.
Can you give me an idea of how to do it?
I imagine that with the following:
` onFilesCheck: function(files, options, listEl, parentEl, newInputEl, inputEl) {
`
The alerts are working, but not the dissallowedExtensions.
Thanks!