i-e-b / jQueryFileUpload.Net

[Out of Date] .Net handler for http://aquantum-demo.appspot.com/file-upload
68 stars 54 forks source link

Firefox delete all issue with errors #14

Closed setiseeker closed 12 years ago

setiseeker commented 12 years ago

Hi,

Awesome sample by the way!

One issue I am having on firefox is that the delete all button is deleting files that where uploaded correctly, but files that failed to upload and displayed an error, are not cleared when selecting the delete all option.

Any advice you can offer is welcomed.

Thanks

i-e-b commented 12 years ago

Each failed upload should have a clear button. You could add a trigger to the 'delete all' button to clear these if you want that behaviour.

setiseeker commented 12 years ago

Thank you for the quick response.

Is this what you mean: (delete now has both the clear and delete handler wired on delete click)

    _initEventHandlers: function () {
        $.blueimp.fileupload.prototype._initEventHandlers.call(this);
        var filesList = this.element.find('.files'),
            eventData = {fileupload: this};
        filesList.find('.start button')
            .live(
                'click.' + this.options.namespace,
                eventData,
                this._startHandler
            );
        filesList.find('.cancel button')
            .live(
                'click.' + this.options.namespace,
                eventData,
                this._cancelHandler
            );
        filesList.find('.delete button')
            .live(
                'click.' + this.options.namespace,
                eventData,
                this._cancelHandler
            );
        filesList.find('.delete button')
            .live(
                'click.' + this.options.namespace,
                eventData,
                this._deleteHandler
            );
    },
i-e-b commented 12 years ago

Hopefully that should work. Please let me know how you get on.

setiseeker commented 12 years ago

It sort of seems to work, but only if there is one failed file. If I have more than one failed file, the first on is removed, but the remainder stay on the screen.

What would the best way be to modify the cancel handler to achieve this?

Thanks for the help.

i-e-b commented 12 years ago

If you can post a sample repo I'll take a look when I get a chance. Maybe someone at the main project site (http://blueimp.github.com/jQuery-File-Upload/) can help you (I only wrote the ASP.Net handler part).