This commit is contained in:
李鹏宇
2025-02-24 11:22:04 +08:00
parent e62216cd47
commit f84519f8f7
+1 -1
View File
@@ -34,7 +34,7 @@ class preview(http.Controller):
# result = mammoth.convert_to_html(file)
# html = result.value
# return template.render(html=html)
elif attach.mimetype in [excel, word]:
elif attach.mimetype in excel or word:
office_view_url = 'http://view.officeapps.live.com/op/view.aspx?src='
base_url = request.env['ir.config_parameter'].sudo().get_param('web.base.url')
html = f'{office_view_url}{quote(base_url + "/web/content/office_preview/" + str(attach.id))}'