Skip to content

Commit

Permalink
hint: registerFileExtension will get obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
drfho committed Aug 29, 2023
1 parent 731ac44 commit 433d2c9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Products/zms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,17 +92,23 @@ def registerDirectory(_context, name, directory=None, recursive=False,
zcml.registerDirectory = registerDirectory
#################################################################################################################

# Additional Registration of FileExtensions
# will get obsolete with
# https://github.com/zopefoundation/Products.CMFCore/pull/130
# https://github.com/zopefoundation/Zope/pull/1146

try:
from Products.CMFCore.DirectoryView import registerFileExtension
from Products.CMFCore.FSFile import FSFile
from Products.CMFCore.FSImage import FSImage
registerFileExtension('xlsx', FSFile)
registerFileExtension('xls', FSFile)
registerFileExtension('doc', FSFile)
registerFileExtension('docx', FSFile)
registerFileExtension('ppt', FSFile)
registerFileExtension('pptx', FSFile)
registerFileExtension('map', FSFile)
registerFileExtension('svg', FSFile)
registerFileExtension('svg', FSImage)
registerFileExtension('ttf', FSFile)
registerFileExtension('eot', FSFile)
registerFileExtension('woff', FSFile)
Expand Down

0 comments on commit 433d2c9

Please sign in to comment.