开发者

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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜