[javascript] IE doesn't support dynamic enctype modification, we have to set encoding too stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 08 Jan 2010 18:20:03 +0100
branchstable
changeset 4217 bf2811a17a17
parent 4216 6c9e67a89b3a
child 4218 deb2dcffb301
[javascript] IE doesn't support dynamic enctype modification, we have to set encoding too
web/data/cubicweb.edition.js
--- a/web/data/cubicweb.edition.js	Fri Jan 08 12:17:42 2010 +0100
+++ b/web/data/cubicweb.edition.js	Fri Jan 08 18:20:03 2010 +0100
@@ -258,7 +258,10 @@
         // if the inlined form contains a file input, we must force
         // the form enctype to multipart/form-data
         if (form.find('input:file').length) {
-            form.closest('form').attr('enctype', 'multipart/form-data');
+	    // NOTE: IE doesn't support dynamic enctype modification, we have
+	    //       to set encoding too.
+            form.closest('form').attr('enctype', 'multipart/form-data')
+		.attr('encoding', 'multipart/form-data');
         }
         postAjaxLoad(dom);
     });