Hi,
I would like to customize the type of file to upload.
For example, allow only the image file to be uploaded
Or forbid the exe file to be uploaded.
Thank you
hi,
no , this is an initialization option, please refer to this example which i've shown:
//Initialize
$(
'.selector'
).igUpload({
allowedExtensions : [
'png'
,
'gif'
],
});
[
]");
Thank you, for applying, but can you tell me please where should I accord it? That's to say in which function? fileUploading?
you can achieve this by setting the value of the allowedExtensions option:
/* type="string" Get or set file allowed file extensions. When this array is empty - it is not made such validation. Example ["gif", "jpg", "bmp"]. */
allowedExtensions: [],
So if you want to have only gif or png, you can say:
allowExtensions: ["png"]
Example file upload code (complete) - to specify that only png or gif are allowed:
]
By the way, you can also follow our online API docs, they have some good and valuable code snippets there (you just need to expand the description of every option):
http://help.infragistics.com/jQuery/2011.2/ui.igupload#!options
Thanks
Angel