plupload file not available / not found

I use the pluploader and jquery for file uploads. I still search a solution for this Problem:

After adding a file the user renames this file on the harddisk. In IE the request is send anyway with an empty file content. (this is ok for me) But in FF (V11) the request never seems to end.

Unfortunately the "Error" trigger doesn't work. In "UploadFile" and "BeforeUpload" I queried file.status but it's only "2" ("uploading") and not "failed".

Does anybody have an idea how to stop the request, or how to check if the file is still available ?

Thanks in advance for your time!

Answers


I have worked with plupload as far as I knew that's not possible.Once when the user finishes uploading he can do whatever he needs.Before uploading or while uploading you can check the filenames and find the duplicates for them whether they exist or not.

UPDATE:

There is only one way you an do this.

Check for the duplicate filenames which are uploaded.For that you need to do this

uploader.bind('FilesAdded', function(up, files) {
        var i = 0;
        while (i++ < up.files.length) {
            var ii = i;
            while (ii < up.files.length) {
                if (up.files[i - 1].name == up.files[ii].name) {
                    uploader.removeFile(up.files[ii]);    
                } else {
                    ii++;
                }
            }
        }
});

As soon as you select files if there is a file with the same filename it deletes the uploaded file and contnues with the next one and so on.


Need Your Help

Having latex-like math formula in the legend

r plot latex legend plotmath

I know how to generate this in the legend:

How to make Emmet on Notepad++ treat extension .xslt as language XSLT?

xslt notepad++ emmet

When file extension is .xsl everything is good, but with .xslt it falls back to default: html, so I cannot expand XSLT code.