Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open attachments with the viewer app #2225

Closed
szaimen opened this issue Nov 8, 2019 · 14 comments
Closed

Open attachments with the viewer app #2225

szaimen opened this issue Nov 8, 2019 · 14 comments

Comments

@szaimen
Copy link
Contributor

szaimen commented Nov 8, 2019

Feature Request

It would be really nice beeing able to open attachments with the viewer app.

Summary

Now that nextcloud/viewer#271 is implemented this could be consideres imo.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@ChristophWurst
Copy link
Member

@skjnldsv do it!

@skjnldsv
Copy link
Member

skjnldsv commented Nov 8, 2019

No! 😁

More seriously, it will require a new api to be able to open the viewer differently than from a dav endpoint :)
Any clue how we should do this @ChristophWurst ?
Because we require a lot of infos. mimetype, direct download url, previews links (if it's a file supported by the IPreview api)

@szaimen
Copy link
Contributor Author

szaimen commented Nov 8, 2019

Maybe caching could help?
So maybe you could implement a setting to enable automatically downloading of all attached files to appdata? And then view them the normal way with the viewer?

Another idea for how this caching could be implemented is, that when opening the first attached file, this and all other attached files from this one mail are cached in appdata and afterwards shown with the viewer app (during this time you just see the viewer app loading the file).
If these attachments are not accessed for a specific time (a few days or so) then they could get removed from appdata with a background job.

@szaimen
Copy link
Contributor Author

szaimen commented Nov 10, 2019

More seriously, it will require a new api to be able to open the viewer differently than from a dav endpoint :)
Any clue how we should do this @ChristophWurst ?
Because we require a lot of infos. mimetype, direct download url, previews links (if it's a file supported by the IPreview api)

Maybe @juliushaertl has some ideas to share on this topic?

@juliusknorr
Copy link
Member

So maybe you could implement a setting to enable automatically downloading of all attached files to appdata? And then view them the normal way with the viewer?

The viewer also won't work with appdata in its current state, just for files that are located in the user directory (though webdav) Also we cannot just expose appdata as not all files in there should be available to all users.

@szaimen
Copy link
Contributor Author

szaimen commented Nov 11, 2019

The viewer also won't work with appdata in its current state, just for files that are located in the user directory (though webdav) Also we cannot just expose appdata as not all files in there should be available to all users.

Then maybe they should get cached for each user in his/her user folder:
Data/Username/mail/
Would that be possible?

@ChristophWurst
Copy link
Member

IMO we should rather make the viewer more versatile so it can also work with arbitrary (local and/or from an URL) data than doing some other hacks. Then it will be a lot easier to integrate in other apps as well.

@skjnldsv
Copy link
Member

IMO we should rather make the viewer more versatile so it can also work with arbitrary (local and/or from an URL) data than doing some other hacks. Then it will be a lot easier to integrate in other apps as well.

Agree :)
Is providing an array of fileinfo (path, filename, mime...) would work for you Christoph?

I'm concern about trying to support two technologies in the viewer. Not sure about having this dual dav/array thing 🤔
Does it bother anyone else? Does it seems ok to you ?

@mario
Copy link

mario commented Dec 30, 2019

@skjnldsv doesn't DAV provide this anyway? So you can abstract it on top as a Map and then have providers (like DAV) which would fill in all the data.

@szaimen
Copy link
Contributor Author

szaimen commented Jan 23, 2020

Would the viewer work for mail attachments as soon as #2064 is implemented?

@ChristophWurst
Copy link
Member

No, #2064 won't change anything on the front-end.

@ChristophWurst
Copy link
Member

Let's continue in #5701. The Viewer can't be used for this as @GretaD found out.

@skjnldsv
Copy link
Member

Or that require some stuff to be adapted from the viewer and dav endpoint 🤔

@ChristophWurst
Copy link
Member

Can someone elaborate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants