Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uploadify only uploading small files

I have uploadify running on Plesk/apache set to FastCGI uploading to an uploads file melow the document root. This seems to work with files less than 1MB but creates an ERROR 500 on anything larger.

$(function() {


var idx=$('.useri').val();
$('#file_upload2').uploadify({
    'multi'    : false,
    'swf'      : 'images/uploadify.swf',
    'uploader' : 'admin_includes/uploadify.php',
    'formData'  : {'user_id': idx},
    'fileSizeLimit' : '10MB',
    // Put your options here
    // Some options
    'onUploadSuccess' : function(file, data, response) {
        if(data==2)
        {
            alert("File Extension needs to be either .docx, .doc or .pdf");
        }
        else
        {
            var data_split=data.split("|");
            $('.title_holder').fadeIn(200);
            $('.upload_hider').show();
            $('.added_file').html("");
            $('.message12').html('<p class="added_file" data-file2='+data_split[1]+'>'+data_split[0]+' Successfully Uploaded.</p>');

        }
    }
});
});

I have also set php.ini as follows

safe_mode = Off
upload_tmp_dir /tmp
upload_max_filesize = 40M
post_max_size = 40M

This does not seem to work either. Is there anything that I am missing or seem to have done wrong ?

like image 561
14 revs, 11 users 47% Avatar asked Feb 14 '26 10:02

14 revs, 11 users 47%


1 Answers

Try setting the sizeLimit option as

'sizeLimit': 5000000000

Also, as a suggestion, you could try subscribing to the onError handler in your uploadify call. Something like this, after the onUploadSuccess handler...

onError: function(a, b, c, d) {
    if (d.status == 404) alert('Could not find upload script.');
    else if (d.type === "HTTP") alert('error ' + d.type + ": " + d.status);
    else if (d.type === "File Size") alert(c.name + ' ' + d.type + ": " + d.status);
    else alert('error ' + d.type + ": " + d.text);
}​
like image 60
palaѕн Avatar answered Feb 16 '26 22:02

palaѕн



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!