Simple Upload with Progress (Custom Validation)
A sample demonstrating how to apply user-defined validation rules to an upload script. Two rules are defined in this example:
- Maximum file size: 100 KB
- Allowed file types: jpeg, jpg, gif, png, zip
MultipleFilesUploadInsertTextMaxSizeKBAllowedFileExtensions
Live demo
Try it: try a file larger than 100 KB, or an unsupported type, to see the validation message.
Working the way you need? Download the free trial or see licence pricing from $99.
<?php
$uploader = new PhpUploader();
$uploader->MultipleFilesUpload = true;
$uploader->InsertText = "Upload (Max 100K)";
$uploader->MaxSizeKB = 100;
$uploader->AllowedFileExtensions = "jpeg,jpg,gif,png,zip";
$uploader->Render();
?>
Guide
Secure file uploads in PHP
Validate content rather than the extension, and store files safely.
Pricing
Licences from $99
Perpetual licence, free upgrades, no recurring fee. Domain, IP, team and enterprise.
