mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-30 13:23:14 +00:00
fixed a bug in the office preview code
This commit is contained in:
parent
baa74e0185
commit
fd9adcd3a3
@ -294,7 +294,7 @@ def view_file(request, repo_id):
|
||||
filesizeformat(FILE_PREVIEW_MAX_SIZE)
|
||||
ret_dict['err'] = err
|
||||
|
||||
elif filetype in (DOCUMENT, PDF) and fsize > OFFICE_PREVIEW_MAX_SIZE:
|
||||
elif filetype in (DOCUMENT, PDF) and HAS_OFFICE_CONVERTER and fsize > OFFICE_PREVIEW_MAX_SIZE:
|
||||
err = _(u'File size surpasses %s, can not be opened online.') % \
|
||||
filesizeformat(OFFICE_PREVIEW_MAX_SIZE)
|
||||
ret_dict['err'] = err
|
||||
@ -465,7 +465,7 @@ def view_history_file_common(request, repo_id, ret_dict):
|
||||
filesizeformat(FILE_PREVIEW_MAX_SIZE)
|
||||
ret_dict['err'] = err
|
||||
|
||||
elif filetype in (DOCUMENT, PDF) and fsize > OFFICE_PREVIEW_MAX_SIZE:
|
||||
elif filetype in (DOCUMENT, PDF) and HAS_OFFICE_CONVERTER and fsize > OFFICE_PREVIEW_MAX_SIZE:
|
||||
err = _(u'File size surpasses %s, can not be opened online.') % \
|
||||
filesizeformat(OFFICE_PREVIEW_MAX_SIZE)
|
||||
ret_dict['err'] = err
|
||||
|
Loading…
Reference in New Issue
Block a user