Updated attachment public title
authorThierry Florac <tflorac@ulthar.net>
Wed, 24 Oct 2018 11:20:19 +0200
changeset 1037 5a697cde9826
parent 1036 ab9733fa4c4e
child 1038 b371683a9aa7
Updated attachment public title
src/pyams_content/component/extfile/__init__.py
--- a/src/pyams_content/component/extfile/__init__.py	Wed Oct 24 10:12:39 2018 +0200
+++ b/src/pyams_content/component/extfile/__init__.py	Wed Oct 24 11:20:19 2018 +0200
@@ -87,7 +87,7 @@
         manager_info = IExtFileManagerInfo(request.root)
         title = II18n(self.context).query_attribute('title')
         if not title:
-            title = self.context.filename
+            title, extension = self.context.filename.rsplit('.', 1)
         return '{0} {1}'.format(II18n(manager_info).query_attribute('default_title_prefix', request=request) or '',
                                 title)