I'm using Uploadify on localhost to develop a site where users can upload files. Everything so far is working fine, but Uploadify refuses to upload any file that's over ~25MB.
I'm using this function to report upload status:
function updateProgress(file, bytesUploaded, bytesTotal, totalBytesUploaded, totalBytesTotal) {
var percent = totalBytesUploaded / totalBytesTotal * 100;
$('.bar').css('width', percent + '%');
console.log(percent +' ' + bytesUploaded);
}
If I try uploading any file that's under 25MB in size it works fine, any file above that and the upload just stops. No error or anything.
These are my relevant php.ini
settings:
post_max_size = 1024M
upload_max_filesize = 1000M
memory_limit = 1024M
and I've confirmed they are correct using phpinfo()
. This is my upload script:
<?php
$targetFolder = '/uploads'; // Relative to the root
if (!empty($_FILES)) {
$tempFile = $_FILES['Filedata']['tmp_name'];
$targetPath = $_SERVER['DOCUMENT_ROOT'] . $targetFolder;
$targetFile = rtrim($targetPath,'/') . '/' . $_FILES['Filedata']['name'];
$fileParts = pathinfo($_FILES['Filedata']['name']);
move_uploaded_file($tempFile,$targetFile);
echo '1';
}
?>
Is there something that I've missed here? Perhaps an Apache configuration setting? The Uploadify documentation has been less than helpful on this error, and I can't seem to find anything through Google.
Thanks.
Found the issue. I had the jQuery effect fadeOut
being applied to the form which at the end of the animation sets the forms style to display: none
. When the form gets to this Uploadify stops the upload.
I simply did this instead:
$('#upload-form').animate({opacity: 0}, function() {
/// whatever
}