Skip to content

Commit

Permalink
svg: added fallback mime by file ext
Browse files Browse the repository at this point in the history
for handling unorthodox svg-xml  variants
  • Loading branch information
drfho committed Sep 7, 2023
1 parent de24c1d commit 67ef904
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Products/CMFCore/FSImage.py
Expand Up @@ -81,6 +81,8 @@ def _readFile(self, reparse):
self.ZCacheable_invalidate()
self._file_mod_time = mtime
ct, width, height = getImageInfo(data)
if ct == '' and self.id.endswith('.svg'):
ct = 'image/svg+xml'
self.content_type = ct
self.width = width
self.height = height
Expand Down

0 comments on commit 67ef904

Please sign in to comment.