Serving large static files with Sinatra
Sinatra can serve files from a static directory with the set :publ开发者_运维知识库ic, 'your_directory'
command, but how can I replicate this in a new route?
Importantly, this new route needs to respect byte ranges too! Any ideas? I feel like I should be able to leverage the already present code in the static serve part of sinatra.
I think I can just use send_file
(see here) - but if anyone has any other suggestions I have open ears!
精彩评论