Open jvdsn opened 4 years ago
I have the same Issue in OnlyOffice. My pull request not merged #4558 yet. May be your issue can be similarly fixed.
@pronichev thanks for your comment. It doesn't seem to be the exact same issue. As you can read in our post we already fixed our problem.
When creating a share link for document files, you can select the "Preview only" or "Preview and download" permissions. Unfortunately, this preview does not actually work if Collabora Online integration is used. Instead, it gives this error message: https://github.com/haiwen/seahub/blob/master/seahub/views/file.py#L1229
The reason for this is the
get_wopi_dict
method returningNone
(https://github.com/haiwen/seahub/blob/master/seahub/wopi/utils.py#L131). This method returnsNone
because no action namedview
matching the file type is found in the WOPIdiscovery.xml
.The Collabora Online
discovery.xml
can be found here: https://github.com/LibreOffice/online/blob/master/discovery.xml. As you can see, for example for an ods file (our main use-case), only theedit
action is specified: https://github.com/LibreOffice/online/blob/master/discovery.xml#L29. However, Collabora Online does in fact also support theview
action (read-only). I assume the developers created the implicit relationship that, if a file type supports theedit
action, it also supports theview
action. Consequently, they did not explicitly specify theview
action for a lot of file types.As a solution, we created our own
discovery.xml
in/etc/loolwsd/
and duplicated everyedit
action for a file type with aview
action. Unfortunately, this is far from perfect. It might be better if seahub also implicitly supports previews for any file ifedit
is supported (with Collabora Online integration). Of course, care should be taken to test every file type and ensure that read-only mode actually works.We run Seafile Server Version: 7.1.4.