KoolUploader - PHP Ajax File UploadKoolUploader - PHP Ajax File UploadFullVersion 2.2.0.0 released on 25/11/2016

Features - Allowed File Extension

AddUpload AllClear All
*Note: Please test uploading with *.txt, *.doc, *.pdf, *.jpg, *.gif ( size < 500KB )

Description & Sample code

KoolUploader supports limiting the file extension that is allowed to upload. This is very crucial in term of security. To enable this feature, you just need to provide list of allowed file extension to allowedExtension property.

There are two levels of setting allowedExtension:

  1. 1. Set allowedExtenstion in KoolUploader's instance: This will allow KoolUploader to check the file extension before uploading and will not allow uploading in case of wrong extension. The good of this level is to provide fast check. The bad is that this is low-level of security since the protection is from client-side.

  2. 2. Set allowedExtenstion in KoolUploadHandler's instance: This will allow KoolUploader to check the file extension at server-side and will cancel the file upload in case of wrong extension. The good of this is to provide high-level security. The bad is that the file need to upload to server first before checking thus it is slow.

*Suggestion: Setting allowedExtension in both KoolUploader's instance and KoolUploadHandler's instance is best choice.