Building attachment table (AJAX)
This sample demonstrates how to build your own attachment table. Uploaded files are posted to a handler page over AJAX, then listed with download and remove links — the same pattern a mail composer uses.
MaxSizeKBMultipleFilesUploadInsertTextAllowedFileExtensions
Live demo
Try it: upload files, then use the download and remove links in the table, or Show files to list what is attached.
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();
?>
<table id="filelist"></table>
<script type="text/javascript">
function CuteWebUI_AjaxUploader_OnPostback()
{
// POST the guid list to ajax-attachments-handler.php,
// then add a row per file returned as JSON
}
</script>
Pricing
Licences from $99
Perpetual licence, free upgrades, no recurring fee. Domain, IP, team and enterprise.
