Open GoogleCodeExporter opened 9 years ago
hi,
this is my fix
diff -Nup noswfupload.js.orig noswfupload.js
--- noswfupload.js.orig 2009-03-22 13:39:46.000000000 +0100
+++ noswfupload.js 2011-10-05 13:46:58.000000000 +0200
@@ -7,6 +7,8 @@ var $ = {
* @author Andrea Giammarchi
* @blog webreflection.blogspot.com
* @license Mit Style License
+ *
+ * 2011-10-05 - jA FIX FF7
*/
/**
@@ -78,6 +80,11 @@ var $ = {
lastInput = wrap.dom.input;
$.event.del(wrap.dom.input, "change", arguments.callee);
for(var max = false, input = wrap.dom.input.cloneNode(true), i = 0, files = $.files(wrap.dom.input); i < files.length; i++){
+
+ //FF 7 fix -jA 5.10.2011
+ if(!files.item(i).fileName) files.item(i).fileName=files.item(i).name;
+ if(!files.item(i).fileSize) files.item(i).fileSize=files.item(i).size;
+
var value = files.item(i).fileName || (files.item(i).fileName = files.item(i).value.split("\\").pop()),
ext = -1 !== value.indexOf(".") ? value.split(".").pop().toLowerCase() : "unknown";
if(wrap.fileType && -1 === wrap.fileType.indexOf("*." + ext)){
Original comment by kopa...@gmail.com
on 8 Dec 2011 at 7:12
Attachments:
Thank you. The above fix worked for FF 8.x Mac - before only Safari was working.
Original comment by J0n4s.H4...@googlemail.com
on 13 Dec 2011 at 4:43
ThX
Original comment by mr.peter...@gmail.com
on 19 Jan 2012 at 3:04
[deleted comment]
The above edit stops it working in IE8. Files upload ok but they are labelled
as "test" in the upload list:
// FF7+ fix
// in IE8/9 files.item(i).name is "test" (form field name!), .filenName is undefined, but results/upload list works.
// in FF11 files.item(i).name is the file name, .fileName is undefined, hence "no files selected".
//So I use the below FF7+ and IE8+, and yes probably better way to do this...
if(files.item(i).fileName==undefined && files.item(i).name!="test"/*upload form field name*/){
files.item(i).fileName=files.item(i).name;
files.item(i).fileSize=files.item(i).size;
}
Original comment by hakim.mi...@gmail.com
on 11 Apr 2012 at 4:02
Not only the file is called "test" in the upload window, also the progress bars
run out of the window, and the indicated number of uploaded bytes is incorrect.
Original comment by eric.g.j...@gmail.com
on 16 Jun 2012 at 5:25
Forgot to add: plus the max file size is ignored.
Original comment by eric.g.j...@gmail.com
on 16 Jun 2012 at 5:28
Original issue reported on code.google.com by
Suhoij@gmail.com
on 17 Nov 2011 at 2:26