2016-03-08 10:51 GMT-06:00 Dave Cross <dave@dave.org.uk>:

Quoting Richard Reina <gatorreina@gmail.com>:

2016-03-08 10:22 GMT-06:00 Dave Cross <dave@dave.org.uk>:


Quoting Richard Reina <gatorreina@gmail.com>:

I take it that I should inlcude the name of any directories such as
'images' (along with javascript & css ) in ./public that I want plack to
serve directly correct?


Yes, that's right. Sorry, I'd removed 'images' from my example, because my
app didn't use them.


Hi Dave,

I tried it and the app works fine. Thanks.  However, is there a way to test
that is actually verify the files are bing served directly? It's not that I
doubt it, just want to make sure as I will be serving some rather large
files.

Simple approach - change the "root" directory in the plugin set-up to one that doesn't exist. Reload and see that your images disappear.


Dave...


Changed to:  path => qr{^/(javascripts|css|images|profile_pics|user_vids)/} , root => './fontsXX/';

and refresshed a sort of makeshift dashboard page and all the non-text content dissapeared accept the embeded videos on that page which are in public/user_vids/ and are displayed with the following markup.

<% IF Vids.size %>
<div class="vcenter">
  <div class="row">
    <div class="col-md-offset-1 col-md-10">
      <div class="wraptocenter">
    <h5><b>My Videos:</b></h5>
    <% FOREACH v IN Vids %>
    <!--<p>Video: <% v %></p>
    <p><% v.substr(8, 1) %></p> -->
    <% IF v.substr(8, 1) == 'L' %> 
    <video controls preload="auto" width="568" height="320">
    <% ELSE %>
    <video controls preload="auto" width="320" height="568">
     <% END %>
    <!-- <video controls="true" preload="auto"> -->
      <source src='user_vids/<% v %>.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' />
      <source src='user_vids/<% v %>.ogv' type='video/ogg; codecs="theora, vorbis"' />
    <!--  <source src='user_vids/<% v %>.webm' type='video/webm;codecs="vp8, vorbis"' /> -->
    </video>
    <% END %>
      </div>
    </div>
  </div>
</div>
<% END %>

Any idea why they persist?