Skip to content

Commit 8438d59

Browse files
committed
Added formAcceptCharset option to set the accept-charset attribute for the iframe upload forms. Fixes blueimp#1535.
If formAcceptCharset is not set, the accept-charset attribute of the file upload widget form is used, if available.
1 parent 4175032 commit 8438d59

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

js/jquery.fileupload.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery File Upload Plugin 5.13
2+
* jQuery File Upload Plugin 5.14
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2010, Sebastian Tschan
@@ -447,6 +447,9 @@
447447
if (options.type !== 'POST' && options.type !== 'PUT') {
448448
options.type = 'POST';
449449
}
450+
if (!options.formAcceptCharset) {
451+
options.formAcceptCharset = options.form.attr('accept-charset');
452+
}
450453
},
451454

452455
_getAJAXSettings: function (data) {

js/jquery.iframe-transport.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* jQuery Iframe Transport Plugin 1.4
2+
* jQuery Iframe Transport Plugin 1.5
33
* https://github.com/blueimp/jQuery-File-Upload
44
*
55
* Copyright 2011, Sebastian Tschan
@@ -42,6 +42,7 @@
4242
return {
4343
send: function (_, completeCallback) {
4444
form = $('<form style="display:none;"></form>');
45+
form.attr('accept-charset', options.formAcceptCharset);
4546
// javascript:false as initial iframe src
4647
// prevents warning popups on HTTPS in IE6.
4748
// IE versions below IE8 cannot set the name property of

0 commit comments

Comments
 (0)