Skip to content

Instantly share code, notes, and snippets.

@nnarhinen
Created September 4, 2010 10:13
Show Gist options
  • Save nnarhinen/565075 to your computer and use it in GitHub Desktop.
Save nnarhinen/565075 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
var uploadUrl = '<?php echo $ro->gen('admin.files.upload+json', array(session_name() => session_id()));?>';
</script>
$(function() {
$('#fb-uploadfile').uploadify({
'uploader' : 'flash/uploadify.swf',
'script' : uploadUrl,
'cancelImg' : 'cancel.png',
'buttonText': 'Selaa',
'fileDataName': 'file',
'auto' : true,
onComplete: function(event, queueID, fileObj, response, data) {
activeInput.val(response);
activeAnchor.attr('href', '/tiedosto/' + response);
overlay.close();
return true;
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment