Created
March 5, 2012 04:41
-
-
Save nysalor/1976652 to your computer and use it in GitHub Desktop.
fileuploader initialize script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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