I'm attempting to get the upload progress from a file upload that I have programmed. The default upload progress (bottom left of browser) comes up and im trying to replicate this.
My PHP uploader works like this:
if (isset($_POST['fileUploadProcess'])) {
define ("filesplace","./voucher-portal/");
if (is_uploaded_file($_FILES['file']['tmp_name'])) {
if ($_FILES['file']['type'] != "application/pdf") {
?>
//refuse anything but pdf
<?php
} else {
$result = move_uploaded_file($_FILES['file']['tmp_name'], filesplace."/$name.pdf");
}
if ($result == 1)
?>
//echo works or not
The uploading process all works mighty fine, however a progress bar is a must and I cant seem to find anything that I can incorporate with my PHP method of file uploading.
NOTE: I'm using this method as I rename the file and place it in a certain directory with database driven vairables