nextcloud-drawio
nextcloud-drawio copied to clipboard
Editor doesn't start if it's a public link
The draw.io online editor doesn't start if you share (a folder within) a draw.io xml file via public link. Instead it will just want to be downloaded.
BTW: Collabora online start the editor with public links. Maybe this is a hint: https://github.com/nextcloud/richdocuments/blob/bd5584faa23dac27caedd83a74093c8220ce7da6/js/viewer/viewer.js#L67
I just noticed, that even the draw.io Icon doesn't show up with the public link.
I also would like that my customers can open the drawio application for xml files that I share with them via a public share link.
I as well, would really like if it was possible to have the drawio work with public links
@ACTom you added Collaborative editing for mindmap. Maybe you could help with this ?
@hoerup Sorry, I have no time to do this recently.
I clone code from only office to allow open by public link. Almost good, but have problem at editor.js code because it cant download file content.
OCA.DrawIO.EditFile = function (editWindow, filePath, origin) {
var ncClient = OC.Files.getClient();
var receiver = function (evt) {
if (evt.data.length > 0 && origin.includes(evt.origin)) {
var payload = JSON.parse(evt.data);
if (payload.event === "init") {
var loadMsg = OC.Notification.show(t(OCA.DrawIO.AppName, "Loading, please wait."));
**ncClient.getFileContents(filePath)** i try give him token full url like '/s/MyToken/download' and relative path like '/user/filepathandname' and it
s return 401.
OnlyOffice app use callbacks and it use token at client script..
Can any body help with script
source code: NextCloud-DrawIO
First beta ready
Is anybody know can set some parameter to drawio application open file in readonly mode ?
@Luckyvb whats the status here? Can you open a PR to enable a side by side view of your changes?
sorry, i was busy. i`am create pr later. about 1..2 days
#104
@pawelrojek I guess this can be closed since #104 was merged.
I have updated to 0.9.9 - but i haven't yet been able to get the public link working ? Is there a trick or a setting somewhere that needs to be set ?
Update: apparently it only works with with the .drawio extension (when that is mapped manually)
Doesn't work for me on a public link. *.drawio file will be just downloaded.
For me the problem still persists in two different Nextcloud instances :-(
Both on versions 1.0.1 for drawIO and 21.0.5 for Nextcloud. Same situation as in the initial post.
I'm happy to provide logs or assistance to support investigations!
Does anyone know if there is a solution for this in the foreseeable future?