tags:

views:

25

answers:

1

Sinatra can serve files from a static directory with the set :public, '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.

A: 

I think I can just use send_file (see here) - but if anyone has any other suggestions I have open ears!

JP