cubiclesoft / jquery-fancyfileuploader

A jQuery plugin to convert the HTML file input type into a fancy file uploader under a MIT or LGPL license. Mobile-friendly too!
58 stars 27 forks source link

uploading only two files issue #21

Closed Asifkrishaweb closed 3 years ago

Asifkrishaweb commented 3 years ago

Hello,

i want to upload more than 2 doc or pdf files but unable to upload it

Below are my js code for file uploading:

$(document).ready(function() {
    var filesList = [];
    $('#files').FancyFileUpload({
        url: "/uploadFile",
        params : {
            _token: $('#create-assignment-form').find('input[name="_token"]').first().val(),
        },
        maxfilesize : 5000000,
        added : function(e, data) {
            this.find('.ff_fileupload_actions button.ff_fileupload_start_upload').click();
      for(var i = 0; i < data.files.length; i++){
        filesList.push(data.files[i].name);
      }
      $('#assignment_files').val(filesList);
        }
    });
    jQuery('.ff_fileupload_dropzone').append('<div class="fileupload_txt">Drag & Drop your files (doc, docx, pdf) <span>or</span><span class="browse_txt">Browse</span></div>')
});

1623162389 (1).docx
1.75 MB of 1.75 MB | 100%

docx

1623162389 (2).docx
1.75 MB of 1.75 MB | 100%

docx

1623162389 (3).docx
1.75 MB | Starting upload...

please help for the same

thank you

cubiclesoft commented 3 years ago

I think that's a browser/server-level issue. You have two simultaneous uploads going and they need to finish first before the browser or server will accept new connections/uploads (i.e. 100% is not actually done). You need to process the data on the server side and respond before the browser/server continue uploading more files.

Asifkrishaweb commented 3 years ago

hello

but when i check in temp folder it's showing 2 files completely uploaded

On Sat, Jun 26, 2021 at 11:15 AM CubicleSoft @.***> wrote:

I think that's a browser/server-level issue. You have two simultaneous uploads going and they need to finish first before the browser or server will accept new connections/uploads (i.e. 100% is not actually done). You need to process the data on the server side and respond before the browser/server continue uploading more files.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cubiclesoft/jquery-fancyfileuploader/issues/21#issuecomment-868952165, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATSZVBOORHHE76DRM7WTQ73TUVSPPANCNFSM47JHRETA .

cubiclesoft commented 3 years ago

Your example shows two files at 100%. That indicates the upload hasn't finished yet. The file data may be on the server but the server side needs to respond correctly to the widget to mark it as actually finished and then start the next upload.

Asifkrishaweb commented 3 years ago

Thank you for the clarification. it's solved.

On Tue, Jun 29, 2021 at 8:27 PM CubicleSoft @.***> wrote:

Your example shows two files at 100%. That indicates the upload hasn't finished yet. The file data may be on the server but the server side needs to respond correctly to the widget to mark it as actually finished and then start the next upload.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cubiclesoft/jquery-fancyfileuploader/issues/21#issuecomment-870673967, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATSZVBLMH7FXIBGDPQ3SPL3TVHNMFANCNFSM47JHRETA .