Skip to content

Commit d246fe6

Browse files
Add back iframe rack middleware support
1 parent 4690884 commit d246fe6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

vendor/assets/javascripts/jquery-fileupload/jquery.iframe-transport.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,13 @@
119119
.val(field.value)
120120
.appendTo(form);
121121
});
122+
// Add a hidden `X-Requested-With` field with the value `IFrame` to the
123+
// form, to help server-side code to determine that the upload happened
124+
// through this transport.
125+
$('<input type="hidden"/>')
126+
.prop('name', 'X-Requested-With')
127+
.val('IFrame')
128+
.appendTo(form);
122129
}
123130
if (options.fileInput && options.fileInput.length &&
124131
options.type === 'POST') {

0 commit comments

Comments
 (0)