Streaming mp4 in Chrome with rails, nginx and send_file
问题 I can't for the life of me stream a mp4 to Chrome with a html5 <video> tag. If I drop the file in public then everything is gravy and works as expected. But if I try to serve it using send_file , pretty much everything imaginable goes wrong. I am using a rails app that is proxied by nginx, with a Video model that has a location attribute that is an absolute path on disk. At first I tried: def show send_file Video.find(params[:id]).location end And I was sure I would be basking in the glory