viewer icon indicating copy to clipboard operation
viewer copied to clipboard

Add support for Office Open XML files

Open szaimen opened this issue 4 years ago • 19 comments

What file type .docx, .xlsx, .pptx and other files

What application is using it Onlyoffice, Libreoffice

Please attach a sample file here Currently not available (you can easily make your own)

Motivation It would be really nice beeing able to open those kind of files with the viewer app. Maybe you could implement opening onlyoffice and/or libreoffice inside the viewer app? Would be really nice because then you would enable all apps to open these kind of files without having to open them in a new tab or download them, etc. :)

szaimen avatar Nov 08 '19 02:11 szaimen

Not sure it make sense. cc @jancborchardt

skjnldsv avatar Nov 08 '19 10:11 skjnldsv

At least for attachments from mails in the mail app it makes sense to me. Also opening such files in the files app in this popup view makes more sense then the current behaviour of opening these files imo.

szaimen avatar Nov 08 '19 10:11 szaimen

Yeah, but people will expect it to be available for files and others (a we don't do viewer file support only on specific areas, either a filetype can be opened in any place the viewer is availabble, or not at all)

And if we have this in the files list or somewhere else, people will expect it to be able to edit the document. Also this would directly conflict with collabora or onlyoffice

skjnldsv avatar Nov 08 '19 11:11 skjnldsv

And if we have this in the files list or somewhere else, people will expect it to be able to edit the document. Also this would directly conflict with collabora or onlyoffice

Yeah that is the reason why I have proposed to implement opening onlyoffice and/or libreoffice inside the viewer app (but don't know if this is techically possible).

Then onlyoffice and/or libreoffice have to "know", whether the current opening path is writeable or not and propose to save the file to files to be able to edit it.

Maybe this could be solved the same way like mentioned here for the pdf_viewer?

szaimen avatar Nov 08 '19 12:11 szaimen

Yeah that is the reason why I have proposed to implement opening onlyoffice and/or libreoffice inside the viewer app (but don't know if this is techically possible).

Ah, I misunderstood :see_no_evil: Not possible :)

skjnldsv avatar Nov 09 '19 09:11 skjnldsv

Good point with enabling people to open e.g. docx documents from Mail attachments.

This would indeed be great, and shouldnt necessarily require a heavy setup, or loading the full editor.

People wouldn't necessarily expect it to be editable, and we can make that clear. Not being able to open a common format on the other hand is a bit weak – we are also an enterprise software after all. (It would be very cumbersome needing to download these Mail attachments, going to Files, finding them, opening them from there …)

cc @juliushaertl and @ChristophWurst for input regarding richdocuments (or view-only) and attachments in Mail, Deck etc.

jancborchardt avatar Nov 09 '19 11:11 jancborchardt

This would indeed be great, and shouldnt necessarily require a heavy setup, or loading the full editor.

Well richdocuments or onlyoffice could of course use the viewer to show their office suite, but without those I see no way of displaying those file types.

juliushaertl avatar Nov 11 '19 12:11 juliushaertl

Well richdocuments or onlyoffice could of course use the viewer to show their office suite

I like this idea 👍

szaimen avatar Nov 11 '19 13:11 szaimen

Actually I think every app that opens a file should utilize the viewer app to show its content (when not already implemented into the viewer). So that this is standardized for the whole Nextcloud Universe. Then apps that open other files then the normal viewer app can automatically benefit from new features like opening in other apps, etc.

szaimen avatar Nov 13 '19 22:11 szaimen

What if you use libreoffice (directly installed on the nextcloud-instance) to temporarily generate a pdf file, which then gets shown by the viewer? Would need a bit longer but in the end would show the document to the user without needing to install an onlyoffice or collabora instance.

szaimen avatar Jan 01 '20 13:01 szaimen

Is this issue already addressed with Nextcloud 18? image https://nextcloud.com/blog/the-new-standard-in-on-premises-team-collaboration-nextcloud-hub/

szaimen avatar Jan 20 '20 12:01 szaimen

Is this issue already addressed with Nextcloud 18?

No, this is about opening the full document and make it accessible for collaborative edition (18/hub) This issue will only be about showing a preview of the document, no edition

skjnldsv avatar Jan 21 '20 16:01 skjnldsv

Do we even need specific support for this in Viewer after the inclusion of OnlyOffice as of Hub?

What Mail and Deck could do when these files are attached is just open the OnlyOffice app, no?

cc @juliushaertl @ChristophWurst

jancborchardt avatar Jan 23 '20 11:01 jancborchardt

Do we even need specific support for this in Viewer after the inclusion of OnlyOffice as of Hub?

What Mail and Deck could do when these files are attached is just open the OnlyOffice app, no?

This is be the way to go imho:

Well richdocuments or onlyoffice could of course use the viewer to show their office suite.

Then you had automatically the ability to open these file types also in other apps and not just in the files app.

E.g. this would be really nice, as soon as file uploads from within the chat in nextcloud talk are available and you send an office file: opening those files would not work with onlyoffice atm since they will not be stored in the normal file system but in appdata, afaik.

szaimen avatar Jan 23 '20 11:01 szaimen

What Mail and Deck could do when these files are attached is just open the OnlyOffice app, no?

I'd say it's fairly different. This is about a quick peek to check what document is what. Opening the full OO editor is still fairly extensive for the browser :)

skjnldsv avatar Jan 23 '20 12:01 skjnldsv

This is about a quick peek to check what document is what. Opening the full OO editor is still fairly extensive for the browser :)

Also OnlyOffice itself only support opening files that are part of the users directory for now. Since files in Deck (and I guess attachments in mail) are stored differently, there is currently no easy way to "just" open them in onlyoffice.

juliushaertl avatar Jan 23 '20 12:01 juliushaertl

Hi, thanks a lot for your efforts to add this functionality.

Is this still in the plans? Any way I could help? Ideally, I would like to integrate this in the rainloop-nextcloud app to preview Office Documents.

Thanks!

pemocarlo avatar May 06 '21 15:05 pemocarlo

@juliushaertl

Also OnlyOffice itself only support opening files that are part of the users directory for now. Since files in Deck (and I guess attachments in mail) are stored differently, there is currently no easy way to "just" open them in onlyoffice.

Can you add a separate mode for the viewer, when it is not opening the internal file by the file ID, but by the link to the file? Think of an API like this.

ONLYOFFICE would add the handling of such a case and open the file by url in view-only mode.

There will be only security issues: the file must be inside the Nextcloud system, and not outside.

LinneyS avatar May 07 '21 08:05 LinneyS

Deck now uses the users files since Nextcloud 21 so opening documents from there will work just as with regular files.

For others it highly depends on where and how the app stores such files.

Can you add a separate mode for the viewer, when it is not opening the internal file by the file ID, but by the link to the file? Think of an API like this.

Probably something for @ChristophWurst to evaluate for the mail app then. I'm not sure how attachments are stored there for example.

juliushaertl avatar May 10 '21 06:05 juliushaertl