I want to send binary data from a Sinatra application so that the user can download it as a file.
I tried using send_databut it gives me an undefined
send_data
undefined
I used something like this:
require 'sinatra' set :port, 8888 set :bind, '0.0.0.0' filename = 'my_firmware_update.bin' get '/' do content_type 'application/octet-stream' File.read(filename) end