Uploadify issue - hangs out 100% even tho file has uploaded

I’ve posted this question on the uploadify support forum, but haven’t heard a whisper there… so hopefully someone can help me out!

I am using uploadify to upload larger files (for videos). The issue I’m having is that the file progress bar 100% AND the file is successfully uploaded, but the ‘onAllComplete’ call back function is never triggered. I know the file successfully uploads, because the file is renamed and placed into the target directory.

I only receive this error for larger size files. The file I tested was ~3.5MB. I’ve tried the following w/ no success:
-Increased max upload size to 500MB in both php.ini and .htaccess
-set_time_limit to 1200
-Set memory size to 256MB in php.ini

Here is my function call code:

    <script type=\\"text/javascript\\">
    $(document).ready(function() {
        $('#video_upload').uploadify({
            'uploader': 'inc/uploadify/uploadify.swf',
            'script': 'inc/uploadify/prepare_encode.php?vid=$vidkey',
            'folder': 'inc/tmp',
            'cancelImg': 'inc/uploadify/cancel.png',
          'auto': true,
          'sizeLimit': 524288000,
          'onAllComplete': function() {
              alert('uploaded');
                document.submission.submit_encode.disabled = false;
                document.submission.submit_encode.value = 'Continue to Step 2';
          }

        });
    });
    </script>

Here is my code in the prepare_encode.php file:

<?
if(!empty($_FILES)) {
   $tempFile = $_FILES['Filedata']['tmp_name'];
   $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';
   $targetFile =  str_replace('//','/',$targetPath) . 'foo'.$_GET['vid'];
   move_uploaded_file($tempFile,$targetFile);
   echo "1";
}
?>

Here is the environment detail:

  • Uploadify v2.1.0
  • CentOS 5 Operating System
  • Apache/1.3.41 (Unix)
  • PHP/5.2.5

Any thoughts? Thanks.

I’ve tested the Uploadify script and it works perfectly fine for me on my localhost, i set

'onAllComplete'  : function(){
    alert('All Uploads Complete');
}

and it worked as expected. If you have firebug you will be able to see if your script has any errors when it gets to the completion step.

It actually works for me on localhost.

It just doesn’t work for larger size files on my production server. I have firebug installed (but never used it before) and it doesn’t appear to show any errors.

uploadify works perfect for me on a production server … did you check your post_filesize in php.ini make sure its set to a higher setting mine is at 24mbs

other than that everything else should just be fine.

I’ve set the upload_max_filesize in php.ini to 500MB. I don’t see any setting called post_filesize.

Due to my frustration, I’ve switched from uploadify to swfupload. With swfupload, the 3.5MB worked perfectly, but now I’m having difficulty with a ~20MB file. The issue here is a bit different… under debug mode, I can monitor of the upload as it reaches completion and returns an upload success status. However, the file is never uploaded to the intended directory.

I do not encounter this problem with the smaller 3.5MB file, nor do I with the 20MB file when testing locally.

Any thoughts on this?

It’s max_post_size - it should be a little larger than upload_max_filesize as max_post_size includes the post and the file being uploaded (as I understand it).

That did it. Thanks guys!

yeah something like that lol thanks immerse

I have the same problem. But im using a Java Backend… so I dont have the init.php file.

The uploader never reaches the complete status. But it does reach 100% and the file arrives. But the problem i have is that the queue never clears and i cannot reuse the upload button another time.
When i call the uploadifyCancel method when the progress reaches 100% it clears the queue but then the upload fails.

What can i check to reach the complete status??


	$(document).ready(function() {
	
		$('#fileUpload').uploadify({
			'uploader'  : '../../plugins/version2/uploadify.swf',
			'script'    : 'http://localhost:8090/Test/FileUpload',
			'cancelImg' : '../../plugins/version2/cancel.png',
			'auto'      : true,
			'buttonText' : 'Upload file!',
			'expressInstall' : '../../plugins/version2/expressInstall.swf',
			'multi'       : false,	
			'queueID'        : 'upload_cola',

  			'onProgress'  : function(event,ID,fileObj,data) {
  				if(data.percentage==100){
					//$('#fileUpload').uploadifyCancel(ID);
					$('#upload_cola').hide();	
				}
				return false;
    		},
    		'onComplete'  : function(event, ID, fileObj, response, data) {
				 alert('test');
				 return false;
			}
			
		});