Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added formAcceptCharset option to set the accept-charset attribute fo…

…r the iframe upload forms. Fixes #1535.

If formAcceptCharset is not set, the accept-charset attribute of the
file upload widget form is used, if available.
  • Loading branch information...
commit 8438d594a3dd6c0c8d78190e5ce0b96bdd52916e 1 parent 4175032
@blueimp authored
Showing with 6 additions and 2 deletions.
  1. +4 −1 js/jquery.fileupload.js
  2. +2 −1  js/jquery.iframe-transport.js
View
5 js/jquery.fileupload.js
@@ -1,5 +1,5 @@
/*
- * jQuery File Upload Plugin 5.13
+ * jQuery File Upload Plugin 5.14
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2010, Sebastian Tschan
@@ -447,6 +447,9 @@
if (options.type !== 'POST' && options.type !== 'PUT') {
options.type = 'POST';
}
+ if (!options.formAcceptCharset) {
+ options.formAcceptCharset = options.form.attr('accept-charset');
+ }
},
_getAJAXSettings: function (data) {
View
3  js/jquery.iframe-transport.js
@@ -1,5 +1,5 @@
/*
- * jQuery Iframe Transport Plugin 1.4
+ * jQuery Iframe Transport Plugin 1.5
* https://github.com/blueimp/jQuery-File-Upload
*
* Copyright 2011, Sebastian Tschan
@@ -42,6 +42,7 @@
return {
send: function (_, completeCallback) {
form = $('<form style="display:none;"></form>');
+ form.attr('accept-charset', options.formAcceptCharset);
// javascript:false as initial iframe src
// prevents warning popups on HTTPS in IE6.
// IE versions below IE8 cannot set the name property of
Please sign in to comment.
Something went wrong with that request. Please try again.