It is a project requirement that some assets 't be openly accessible, so I am serving them up with an AssetsController, such as this:
def show asset = Asset.find(params[:id]) unless Article.viewable_by(current_user).find_by_id(asset.attachable_id).nil? send_file asset.data.path(style = params[:style]), :type => asset.data_content_type, :disposition => 'inline' #THIS else head(:forbidden) and return end end
Works acceptable for images. Videos aren't playing within the browser. They work fine when offered up from /public.
Here are a few screenshots (tugging the assets, network tab on Chrome developer tools is open)
Working (it plays, still seeing canceled demands)
This is what Apache needs to say about this:
[ pid=2796 thr=140722427586528 file=ext/apache2/Hooks.cpp:784 time=2011-12-06 21:36:57.803 ]: Either the vistor clicked on the 'Stop' button in the web browser, or the visitor's connection has stalled and couldn't receive the data that Apache is sending to it. A$
I made two demands, and also got a number of these for every one.