Seafile Pro 6.1.3 / OnlyOffice Viewer Mode

Hi,

After 6.1.3 upgrade, office documents are opened in Viewer mode into OnlyOffice.
In the previous 6.1.1 version, office documents were opened in Editor mode.
Is there any config option in seafile that could push the API call in Editor mode ?

PS linked to Seafile pro edition 6.1.3 is ready! Now users can see number of files in a folder or a library - #3 by gauburtin

I saw a new var ONLYOFFICE_EDIT_FILE_EXTENSION in

seafile-pro-server-6.1.3/seahub/seahub/onlyoffice/settings.py

ONLYOFFICE_APIJS_URL = getattr(settings, 'ONLYOFFICE_APIJS_URL', '')
ONLYOFFICE_FILE_EXTENSION = getattr(settings, 'ONLYOFFICE_FILE_EXTENSION', ())
ONLYOFFICE_EDIT_FILE_EXTENSION = getattr(settings, 'ONLYOFFICE_EDIT_FILE_EXTENSION', ())
VERIFY_ONLYOFFICE_CERTIFICATE = getattr(settings, 'VERIFY_ONLYOFFICE_CERTIFICATE', True)
ONLYOFFICE_EDITOR_LANGUAGE_SETTING = getattr(settings, 'ONLYOFFICE_EDITOR_LANGUAGE_SETTING', '')

I added this var in seahub_settings.py

ONLYOFFICE_FILE_EXTENSION = (‘doc’, ‘docx’, ‘ppt’, ‘pptx’, ‘xls’, ‘xlsx’, ‘odt’, ‘fodt’, ‘odp’, ‘fodp’, ‘ods’, ‘fods’)
ONLYOFFICE_EDIT_FILE_EXTENSION = (‘doc’, ‘docx’, ‘ppt’, ‘pptx’, ‘xls’, ‘xlsx’, ‘odt’, ‘fodt’, ‘odp’, ‘fodp’, ‘ods’, ‘fods’)

It does not work

I tried to edit

/home/cc/seafile/seafile-pro-server-6.1.3/seahub/seahub/views/file.py

        if file_perm == 'rw' and ((not is_locked) or (is_locked and locked_by_me)) and \
                   fileext in ONLYOFFICE_EDIT_FILE_EXTENSION:
            can_edit = True
        else:
            can_edit = True

It does not work neither

Regards,

Gautier

Hi,

on my system the ONLYOFFICE_EDIT_FILE_EXTENSION = (‘docx’, ‘pptx’, ‘xlsx’) works fine.

Did you restart the server and reload the web page?

Best Regards

Yes i did.
Many times

But the config file was not saved.
:confounded:

Now it is.

And it works fine

I think the manual should be updated to include ONLYOFFICE_EDIT_FILE_EXTENSION var.

regards (and thank you)