Skip to content

Instantly share code, notes, and snippets.

@tbuchok
Last active December 16, 2015 23:59
Show Gist options
  • Save tbuchok/5517692 to your computer and use it in GitHub Desktop.
Save tbuchok/5517692 to your computer and use it in GitHub Desktop.
require 'open-uri'
uri = 'http://domain.com/long_file.mp3'
# assumes `send_data` sends response:
send_data(open(uri).read, type: 'audio/mpeg')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment