Skip to content

Instantly share code, notes, and snippets.

@nysalor
Created March 5, 2012 04:41
Show Gist options
  • Save nysalor/1976652 to your computer and use it in GitHub Desktop.
Save nysalor/1976652 to your computer and use it in GitHub Desktop.
fileuploader initialize script
# initializer for fileuploader.js(http://github.com/valums/file-uploader)
@create_uploader = (upload_action, complete_action, token) =>
uploader = new qq.FileUploader {
element: document.getElementById('upload'),
action: upload_action,
debug: false,
params: {
authenticity_token: token
},
onComplete: () =>
$.get complete_action, (data) ->
eval data
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment