Hi all,
I've been trying to customize FancyUpload to pass extra data via POST
with every upload (file title and description fields).
Everything works fine in FF, but in IE6 & 7 POST is not sent to the
server.
After many hours of debugging I discovered, that the problem lies in
this method:
onBeforeOpen: function(file, options) {
this.log('Initialize upload for "{name}".', file);
var fn = this.options.fileUpload;
var obj = (fn) ? fn.call(this, this.getFile(file), options) :
options;
return obj;
},
`obj` contains additional data for POST - title and description. It is
not received by Flash caller in IE, thus it's not sent to the server.
It appears that IE occasionally has problems with
ExternalInterface.call() calls and loses values returned by Javascript
functions.
I found a link on the web that describes similar behaviour:
http://scott.harwell.me/?p=108. There the author claims that <embed />
tags should be used. However, Swiff only uses <object /> tag. Could
this be a problem?
There is another place in FancyUpload code that creates problem with a
similar symptoms.
Open the following in IE:
http://digitarald.de/project/fancyupload/2-0/showcase/photoqueue-fixed/
Check"Images only" checkbox, click "Browse File" link. You will see
that filter was not applied and file mask is set to *.* (in FF you are
going to see image file extensions).
In this case, the problem lies in:
initialize: function(options){
....
if (!callBacks.onBrowse) {
callBacks.onBrowse = function() {
return this.options.typeFilter;
}
}
}
See "return this.options.typeFilter;" there? Well, that's exactly what
does not go back to Flash in IE.
I have Flash 10 and I've tested this in Flash 9 as well. IE gets it
all wrong on both cases.
The problem looks quite serious, this essentially renders external
interface calls unusable.
Any help offered will be greatly appreciated.
Thanks,
Temuri