Skip to content

@saiko-chriskun /send.coffee
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
jquery-upchunk's send function
send = (chunk, url) =>
fd = new FormData
fd.append(@opts.file_param, chunk)
xhr = new XMLHttpRequest
xhr.open('POST', url, true)
xhr.send(fd)
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.