Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

jquery-upchunk's send function

View send.coffee
1 2 3 4 5 6
send = (chunk, url) =>
fd = new FormData
fd.append(@opts.file_param, chunk)
xhr = new XMLHttpRequest
xhr.open('POST', url, true)
xhr.send(fd)
View send.coffee
1 2 3
File.open('/tmp/' + current_user.lowname + '_' + params[:hash], 'a') do |upload|
upload.write(File.read(params[:file].tempfile))
end
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.