SimpleUploads, Validation of uploaded files

This sample shows different options to validate the files with the SimpleUpload plugin.
You can read about other features here

Default config.js settings

This editor uses the main settings, restricting only to the set of extensions allowed by the server script:

Server check

This editor doesn't check the file extension, but if you try to upload something like a php file, it will be rejected by the server
Obviously this is worse because the error is shown only after the file has been uploaded. This is the default behavior of CKEditor.

Maximum size

The maximum size for any file added here is 100 Kb by setting simpleuploads_maxFileSize = 100 * 1024;

Restrict valid images

In this div only png files are recognized as images by setting config.simpleuploads_imageExtensions = 'png'

If you add other files like .jpg, they will be treated like a generic file and linked instead of creating an img tag

Upload event

This editor uses a custom validation: the file must start with "wall"