mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-03 09:14:48 +09:00
Automatically add method=POST and enctype=multipart/form-data to iframe submissions
This commit is contained in:
parent
69611520c3
commit
4e6607c1c3
1 changed files with 1 additions and 0 deletions
|
|
@ -374,6 +374,7 @@
|
||||||
if (has_files) {
|
if (has_files) {
|
||||||
var iframe_id = '_rx_temp_' + (new Date()).getTime();
|
var iframe_id = '_rx_temp_' + (new Date()).getTime();
|
||||||
$('<iframe id="' + iframe_id + '" name="' + iframe_id + '" style="display:none"></iframe>').appendTo($(document.body));
|
$('<iframe id="' + iframe_id + '" name="' + iframe_id + '" style="display:none"></iframe>').appendTo($(document.body));
|
||||||
|
form.attr('method', 'POST').attr('enctype', 'multipart/form-data');
|
||||||
form.attr('target', iframe_id).find('input[name=_rx_target_iframe]').remove();
|
form.attr('target', iframe_id).find('input[name=_rx_target_iframe]').remove();
|
||||||
form.append('<input type="hidden" name="_rx_target_iframe" value="' + iframe_id + '" />');
|
form.append('<input type="hidden" name="_rx_target_iframe" value="' + iframe_id + '" />');
|
||||||
window.remove_iframe = function(iframe_id) {
|
window.remove_iframe = function(iframe_id) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue