From a15d8221ca718e8ed4beb6b9239182dd8a4cbcb9 Mon Sep 17 00:00:00 2001 From: Dan Helfman Date: Fri, 20 Mar 2009 15:37:14 -0700 Subject: [PATCH] Fixed a bug in which the new upload code didn't work in IE due to IE not noticing that enctype was set to multipart/form-data. --- static/js/Wiki.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/static/js/Wiki.js b/static/js/Wiki.js index 8c15af5..73337b6 100644 --- a/static/js/Wiki.js +++ b/static/js/Wiki.js @@ -3661,6 +3661,9 @@ function Upload_pulldown( wiki, notebook_id, invoker, editor, link, anchor, ephe appendChildNodes( this.upload_area, createDOM( "input", { "name": "file_id", "id": "file_id", "type": "hidden", "value": "new" } ) ); appendChildNodes( this.div, this.upload_area ); + // for the benefit of Internet Explorer + getElement( "upload_form" ).encoding = "multipart/form-data"; + connect( this.upload_button, "onclick", function ( event ) { self.upload_started(); } ); @@ -3692,6 +3695,7 @@ Upload_pulldown.prototype.update_file_id = function ( result ) { } Upload_pulldown.prototype.upload_started = function ( file_id ) { + this.ephemeral = false; this.uploading = true; var filename = base_upload_filename();