mardi 4 août 2015

qq fine uploader multiple files not able to upload

I've used qq fine uploader for uploading files.
According to requirement,at max 5 files can be uploaded.
It works but sometimes it behaves strange. If I select 5 files, few files get uploaded and few shows processing message continuously.

   var manualUploader = new qq.FineUploader({
            element: document.getElementById('fine-uploader-manual-trigger'),
            template: 'qq-template-manual-trigger',
            request: {
                endpoint: 'UploadQCDoc.aspx'
            },
            thumbnails: {
                placeholders: {
                    waitingPath: '/fine-uploader/placeholders/waiting-generic.png',
                    notAvailablePath: '/fine-uploader/placeholders/not_available-generic.png'
                }
            }, deleteFile: {
                enabled: true,
                forceConfirm: true

            },
            autoUpload: false,
            debug: true,
            messages: {
                tooManyItemsError: 'You can not upload more than ' + '<%=ConfigurationManager.AppSettings["QCMaxUpload"].ToString() %>' + ' documents.'
            },
            validation: {
                allowedExtensions: ['jpeg', 'jpg', 'png', 'gif', 'pdf', 'docx', 'csv', 'xlsx', 'xls'],
                sizeLimit: 10485760, // 10mb
                itemLimit: thermoMaxUploadLimit
            },
            callbacks: {
                onSubmitted: function (id, name) {

                }, onUpload: function (id, name) {

                },
                onCancel: function (id, name) {

                },
                onValidate: function () {

                },

                onComplete: function (id, fileName, responseJSON) {
                    if (responseJSON.success) {
                        tempFileName = fileName + ":" + responseJSON.filename + "\\";
                        fArray[id] = tempFileName;

                    }
                },
                onSubmitDelete: function (id) {
                    if (confirm("Are you sure you want to delete?")) {
                        var fileName = fArray[id].split(":")[0];
                        if (fileName != null && fileName != '') {
                            DeleteFile(0, fileName, id); //for files that are not stored in db but in folder only , filename will be used to delte file
                        }
                    }
                    return false;
                }

            }
        });

        qq(document.getElementById("trigger-upload")).attach("click", function () {
            manualUploader.uploadStoredFiles();
        });

What the issue can be? Any help will be appreciated.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire