I created a function like this:
window.SetUploader = function(action, elementID, multiple, allowedExtensions) {
//Optional arguments
if (actionUploader == null) {
actionUploader = "/Upload";
}
if (elementIDUploader == null) {
elementIDUploader = "file-uploader";
}
if (multipleUploader == null) {
multipleUploader = false;
}
if (allowedExtensions == null) {
allowedExtensions = [];
}
//Function
.....
};
To call this function, use the following code:
SetUploader('/Projects/ImageUpload', 'Logo', { allowedExtensions: ['jpg', 'jpeg', 'png', 'gif', 'zip'] });
Note the parameter allowedExtensions, it does not change the value.
Debugging function, allowedExtensions value is null.
What is wrong?