[tahoe-lafs-trac-stream] [tahoe-lafs] #1828: Problem with linked images' display in rst docs from trac

tahoe-lafs trac at tahoe-lafs.org
Thu Oct 25 18:14:49 UTC 2012


#1828: Problem with linked images' display in rst docs from trac
-------------------------+--------------------------
     Reporter:  mk.fg    |      Owner:
         Type:  defect   |     Status:  new
     Priority:  minor    |  Milestone:  undecided
    Component:  website  |    Version:  n/a
   Resolution:           |   Keywords:  website docs
Launchpad Bug:           |
-------------------------+--------------------------

Comment (by mk.fg):

 I vaguely remember that the images were displayed on docs in the past, so
 I'd guess maybe some configuration bits from darcs plugin were not applied
 to git.

 Ideally, I imagine it might have a whitelist of mime-types (like
 "image/*") or file patterns (like "*.{jpg,png,svg}") to serve raw, but
 lacking that I can imagine a following workaround (nginx config syntax):

 {{{
 location ~ ^/trac/tahoe-lafs/browser/git/docs/(\S+\.(svg|png|jpg|gif))$ {
   uwsgi_param REQUEST_URI /trac/tahoe-lafs/export/master/git/docs/$1;
   uwsgi_param PATH_INFO /trac/tahoe-lafs/export/master/git/docs/$1;

   uwsgi_pass unix:/run/uwsgi/trac.sock;
 }

 location / {
   ... block for the rest of the urls
 }
 }}}

 (nginx seem to be advertised in the response headers)

 I think it'd only introduce a little bit of unexpected behavior for users
 who might browse git tree and expect intermediate page for images, not the
 raw entities, but I think it shouldn't be that much of a problem either
 (browsers seem to handle images w/o html wrapping).

-- 
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/1828#comment:3>
tahoe-lafs <https://tahoe-lafs.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list