Examples

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.

validation.php
<?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.

Reference API documentation

Every property and server-side event the component exposes.

Get started Download the free trial

The evaluation build ships with these samples and full source.

Pricing Licences from $99

Perpetual licence, free upgrades, no recurring fee. Domain, IP, team and enterprise.