Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
cross domain multipart post for file upload
var iframeId = 'somethingUnique';
var url = 'http://someotherdomain.com';
var $form = $('<form>');
$form.attr('id', 'foo');
$form.attr('action', url);
$('<iframe name="' + iframeId + '" id="' + iframeId + '" />').appendTo('body');
$("#" + iframeId).attr('style', 'display: none;');
$("#" + iframeId).append($form);
$form.attr('target', iframeId);
$form.attr('method', 'POST');
$form.attr('enctype', 'multipart/form-data');
$form.attr('encoding', 'multipart/form-data');
$form.submit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.