Keeping state after submitting
A sample demonstrating how to keep the uploaded file state across page posts. Upload a few files, submit the form, and the list survives the round trip.
MaxSizeKBMultipleFilesUploadInsertTextAllowedFileExtensions
Live demo
Try it: upload a file, press Submit Form, and note that the file list and the clock both update while the state is kept.
Working the way you need? Download the free trial or see licence pricing from $99.
<?php
$uploader = new PhpUploader();
$uploader->MultipleFilesUpload = true;
$uploader->MaxSizeKB = 10240;
$uploader->Name = "myuploader";
$uploader->InsertText = "Select multiple files (Max 10M)";
$uploader->AllowedFileExtensions = "*.jpg,*.png,*.gif,*.bmp,*.txt,*.zip,*.rar";
$uploader->Render();
// after the post, look each guid up again
$mvcfile = $uploader->GetUploadedFile($fileguid);
?>
Guide
PHP file upload not working?
A checklist in dependency order, from the form tag to permissions.
Pricing
Licences from $99
Perpetual licence, free upgrades, no recurring fee. Domain, IP, team and enterprise.
