1
This commit is contained in:
@@ -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))}'
|
||||
|
||||
Reference in New Issue
Block a user