0

I'm using the plugin from blueimp (https://github.com/blueimp/jQuery-File-Upload) to upload files.

I have a problem, when I'm uploading several files (like 20 pictures), the first 7 are uploaded correctly but after I get the PHP error (The uploaded file was only partially uploaded).

Is there something to configure with this plugin to avoid this problem ?

I set the plugin like that :

$('#upload').fileupload({
    // This element will accept file drag/drop uploading
    dropZone: $('#drop'),
    maxFileSize: 5000000,
    acceptFileTypes: /(\.|\/)(gif|jpe?g|png)$/i,
    // This function is called when a file is added to the queue;
    // either via the browse button, or via drag/drop:
    add: function(e, data) {

        var tpl = $('<li class="working"><input type="text" value="0" data-width="48" data-height="48"' +
                ' data-fgColor="#0788a5" data-readOnly="1" data-bgColor="#3e4043" /><p></p><span></span></li>');

        // Append the file name and file size
        tpl.find('p').text(data.files[0].name)
                .append('<i>' + formatFileSize(data.files[0].size) + '</i>');

        // Add the HTML to the UL element
        data.context = tpl.appendTo(ul);

        // Initialize the knob plugin
        tpl.find('input').knob();

        // Listen for clicks on the cancel icon
        tpl.find('span').click(function() {

            if (tpl.hasClass('working')) {
                jqXHR.abort();
            }

            tpl.fadeOut(function() {
                tpl.remove();
            });

        });

        // Automatically upload the file once it is added to the queue
        var jqXHR = data.submit();
    },
    progress: function(e, data) {

        // Calculate the completion percentage of the upload
        var progress = parseInt(data.loaded / data.total * 100, 10);

        // Update the hidden input field and trigger a change
        // so that the jQuery knob plugin knows to update the dial
        data.context.find('input').val(progress).change();

        if (progress == 100) {
            data.context.removeClass('working');
        }
    },
    fail: function(e, data) {
        // Something has gone wrong!
        data.context.addClass('error');
    }

});

Any ideas what could be the problem ?

Thanks for your help

2 Answers 2

1

Try Check : upload_max_filesize = 100M post_max_size = 100M

In your php.ini

Sign up to request clarification or add additional context in comments.

1 Comment

upload_max_filesize and post_max_size are equals to 64M. For the test, i'm trying to upload 25 picture (3M).
0

I found a solution, I changed the protocol FastCGI to CGI on my webserver and it works ;-)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.