Author: konstantin.mishin
Date: 2010-11-19 13:03:10 -0500 (Fri, 19 Nov 2010)
New Revision: 20126
Modified:
sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js
Log:
RF-9496
Modified:
sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js
===================================================================
---
sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js 2010-11-19
18:02:08 UTC (rev 20125)
+++
sandbox/trunk/ui/fileupload/ui/src/main/resources/META-INF/resources/org.richfaces/fileupload.js 2010-11-19
18:03:10 UTC (rev 20126)
@@ -102,15 +102,18 @@
__submit: function() {
var originalAction = this.form.attr("action");
+ var originalEncoding = this.form.attr("encoding");
var originalEnctype = this.form.attr("enctype");
try {
this.loadableItem.input.attr("name", this.id);
this.form.attr("action", originalAction + "?" + UID +
"=1");
+ this.form.attr("encoding", "multipart/form-data");
this.form.attr("enctype", "multipart/form-data");
this.iframe.load(jQuery.proxy(this.__load, this));
richfaces.submitForm(this.form, null, this.id);
} finally {
this.form.attr("action", originalAction);
+ this.form.attr("encoding", originalEncoding);
this.form.attr("enctype", originalEnctype);
this.loadableItem.input.removeAttr("name");
}