I tried to upload an image using localhost was upload instantly, however, when tried on my webhosting, it took more than 5 mins for the file to appear in "_uploads" folder.
Do anyone encounter the same problem? Does AV took account for the delay in scanning?
<?php
$hasError = false;foreach( $_FILES as $i=>$file ){
if ( $file['error'] ){
$hasError = true;
}
}
if ( ! $hasError ){
$filename = '_uploads/'.$_GET["key"].'_'.$file["name"];
$myFilePath = '_uploads/'.$_GET["key"].'_'.$file["name"];
$dta = file_get_contents($file['tmp_name']);
file_put_contents($myFilePath, $dta);
echo('success');
} else {
echo('Image was not successfully upload.');
}
?>