not sure how this is done, but following how's its done in Sinatra wouldn't cut it on Goliath - How can I send binary data from Sinatra?
how to send_data or attached file with goliath and grape?
677 views Asked by David At
1
not sure how this is done, but following how's its done in Sinatra wouldn't cut it on Goliath - How can I send binary data from Sinatra?
You can set the 'Content-Type' header into the headers hash and then just send the data back, if your file is small enough.
If the file is large, you can do chunked streaming of the response, take a look in the examples directory of Goliath to see a couple of streaming samples.