You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JS API / container for apps to embed viewers/editors #13414
Currently every file viewer / file editor app is registering a FileAction and then doing whatever they want to try and embed themselves into the current view.
Also, back button support, URL and breadcrumb need to be managed by the app itself.
A new API / container need to be developed in the files app that allows apps to register viewer/editor handlers. The API will automatically support this:
getViewerContainer() will return the container that the viewer must use to embed itself
event APIs to communicate between the viewer and the files app (open event, close event, etc)
back button handling
URL handling:
modify URL to point to the file upon file opening
if the URL was opened directly in the browser, automatically open the matching editor
5) this must also work in public preview mode (files_sharing public link)
The problem with going back using the browser remains in 8.0.0.4, I think users will find it really annoying.
Entering a folder, previewing a pdf or a text file and going back distorts web UI.
One important part is that the viewer implementations should not compute download URLs by themselves. They need to use the ones given by the API/container because the viewer cannot predict in which view it is. This would also make it possible to view files in the trashbin.
The container could also inject an instance of JS Files API (#13905) so the viewer/app can access any file operation if needed (including download/upload)
@PVince81 Yes. Hard part is handling the additional stuff that the text editor needs. If this will truly handle 'editors' there needs to be some consideration into the saving part.
I thought about it. If I remember well the additional part is about checking if the file was changed on the server ? Basically some kind of conflict detection ?
This should be doable over WebDAV too, just like the sync client does.
If the viewer knows the etag of the file before saving, it could call api.saveFile(path, contents, {etag: oldEtag}); and the WebDAV call might fail with "409 conflict" if the file was changed.
I see. Either it could be done in pure JS (if that is even possible), or the text editor would still have to use its own endpoint, but that one needs to be made flexible to be able to load files from the trashbin as well.
31 remaining items
ghost removed this from the This milestone has been deleted milestone on Feb 23, 2016
Activity
michaelstingl commentedon Jan 19, 2015
00002190
SergioBertolinSG commentedon Jan 30, 2015
The problem with going back using the browser remains in 8.0.0.4, I think users will find it really annoying.
Entering a folder, previewing a pdf or a text file and going back distorts web UI.
PVince81 commentedon Jan 30, 2015
I can try and look into this for 8.1
PVince81 commentedon Feb 4, 2015
One important part is that the viewer implementations should not compute download URLs by themselves. They need to use the ones given by the API/container because the viewer cannot predict in which view it is. This would also make it possible to view files in the trashbin.
The container could also inject an instance of JS Files API (#13905) so the viewer/app can access any file operation if needed (including download/upload)
tomneedham commentedon Feb 4, 2015
@PVince81 Yes. Hard part is handling the additional stuff that the text editor needs. If this will truly handle 'editors' there needs to be some consideration into the saving part.
PVince81 commentedon Feb 4, 2015
I thought about it. If I remember well the additional part is about checking if the file was changed on the server ? Basically some kind of conflict detection ?
This should be doable over WebDAV too, just like the sync client does.
If the viewer knows the etag of the file before saving, it could call
api.saveFile(path, contents, {etag: oldEtag});and the WebDAV call might fail with "409 conflict" if the file was changed.tomneedham commentedon Feb 4, 2015
Essentially yes. The only other bit is some fixes on the encoding, but this might be handled by core now, considering this was written for OC3: https://github.com/owncloud/files_texteditor/blob/master/ajax/savefile.php#L47
PVince81 commentedon Feb 5, 2015
I see. Either it could be done in pure JS (if that is even possible), or the text editor would still have to use its own endpoint, but that one needs to be made flexible to be able to load files from the trashbin as well.
31 remaining items
PVince81 commentedon Jan 27, 2017
Moving to backlog for now, no time for this
PVince81 commentedon Dec 13, 2017
By extension, also to provide a diff view, see #4056
PVince81 commentedon Aug 10, 2018
this will be reconsidered with Phoenix owncloud/web#215