PHP File Uploader Demos
Every sample below runs live — upload a real file and watch it work. Each shows the properties involved and the source behind it, and the evaluation download ships with all of them.
Start here: allowed types jpg, gif, png, zip, maximum 10 MB per file.
MultipleFilesUploadInsertTextMaxSizeKBAllowedFileExtensions
Live demo
Try it: pick several files at once - each gets its own progress bar, and you can cancel mid-transfer.
<?php
require_once "phpuploader/include_phpuploader.php";
$uploader = new PhpUploader();
$uploader->MultipleFilesUpload = true;
$uploader->MaxSizeKB = 10240;
$uploader->AllowedFileExtensions = "jpeg,jpg,gif,png,zip";
$uploader->Render();
?>
All samples
Basic examples
Simple Upload with Progress
One file, a live progress bar and a callback when the transfer completes.
MaxSizeKBAllowedFileExtensions
Selecting multiple files
Pick several files in one dialog and watch each transfer independently.
MultipleFilesUpload
Customizing UI
Supply your own button, progress panel and cancel control by element id.
InsertButtonIDProgressCtrlID
Custom Upload Validation
Reject files by size and type in the browser, before anything is sent.
MaxSizeKBAllowedFileExtensions
Start uploading manually
Queue files first, then begin the transfer from your own button.
ManualStartUpload
Custom upload handler
Send incoming files to your own PHP page to rename, move or process them.
UploadUrl
Keeping state after submit
Look uploaded files up again by guid after the form posts back.
GetUploadedFile
Drag and drop upload
Drop files onto the page - or a folder, or a pasted screenshot - and the uploader takes them.
upl-dropzone
Drop zone: compact bar
The same behaviour as a slim one-line strip that fits inside a form.
upl-dropzone--compact
Drop zone: whole page
The entire window becomes the target, with an overlay while dragging.
data-mode=overlay
Drop zone: image preview
A round single-image target that previews the picture before it finishes uploading.
data-preview=single
Large file upload
Stream big files straight to a folder without buffering them in memory.
SaveDirectory
Save straight to a folder
Write uploads directly into a directory with client-side validation.
SaveDirectoryFlashUploadMode
Upload button cursor
Change the pointer shown over the upload button.
UploadCursor
Ajax samples
Multiple-file upload (AJAX)
Post the finished file list to a handler page without reloading.
OnPostback
Attachment table
Build a mail-style attachment list with download and remove links.
OnPostbackGetUploadedFile
Guides
Upload articles
Plain-PHP guides to size limits, error codes, security, chunked uploads and progress bars.
Get started
Download the trial
The evaluation build ships with every sample on this page, with full source.
