Skip to content

Instantly share code, notes, and snippets.

@hadrienl
Created November 29, 2011 14:48
Show Gist options
  • Save hadrienl/1405048 to your computer and use it in GitHub Desktop.
Save hadrienl/1405048 to your computer and use it in GitHub Desktop.
var form = this.container.one('.'+FORM_UPLOAD),
id = "upload_" + Math.random(),
iframe = Y.Node.create('<iframe name="'+id+'"></iframe>'),
body = Y.one(document.body);
iframe.on(
'load',
function(e)
{
console.debug(e);
}
);
body.append(iframe);
form.setAttribute('action', Y.config.api+'images/upload');
form.setAttribute('target', id);
form.submit();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment