diff MoinMoin/action/AttachFile.py @ 3307:f4212fb5ecb0

EmbedObject: fixed bug for image mimetype and configured when to call EmbedObject
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 18 Mar 2008 19:43:45 +0100
parents 65adbf84a0fb
children 5f660b3c1cd7
line wrap: on
line diff
--- a/MoinMoin/action/AttachFile.py	Tue Mar 18 19:22:01 2008 +0100
+++ b/MoinMoin/action/AttachFile.py	Tue Mar 18 19:43:45 2008 +0100
@@ -950,7 +950,9 @@
     request.write('%s<br><br>' % link)
 
     mt = wikiutil.MimeType(filename=filename)
-    if mt.major == 'image':
+
+    # later on we can add svg too. (destinguishs if browser need a plugin in place)
+    if mt.major == 'image' and mt.minor in ('jpg', 'jpeg', 'png', 'gif'):
         request.write('<img src="%s" alt="%s">' % (
             getAttachUrl(pagename, filename, request, escaped=1),
             wikiutil.escape(filename, 1)))