nextcloud-drawio icon indicating copy to clipboard operation
nextcloud-drawio copied to clipboard

.drawio files not opening in draw.io

Open dougti opened this issue 5 years ago • 11 comments

Hi, I've added the MIME type to /config/mimetypemapping.json, as per the instructions, however files with the .drawio extension are still being sent to the browser for download. There is also no option to open the file with draw.io via the context menu.

I've also tried adding "application/x-drawio" to /etc/apache2/mods-enabled/mime.conf & reloading Apache, however it made no difference.

Have I missed something?

v0.9.1 (NC 13.06)

For full disclosure, there's also an external reverse proxy (nginx) that sits between the client & the internal webserver, however I don't think should make a difference. It's the internal webserver/Nextcloud which should be directing the client to draw.io...

Cheers

dougti avatar Oct 03 '18 17:10 dougti

I've also run occ maintenance:mimetype:update-js, as per the docs, but still no luck.

dougti avatar Oct 03 '18 18:10 dougti

I had something similar happen. I changed the file extension to .drawio and it BROKE association with the Draw.io tool. renaming it '.xml' as the extension didn't work either. Now it wants to download all my drawings instead of opening them up for editing. Me thinks some attention needs be paid to the file extension and the association with the tool. Just say'n. (Great tool btw, love it when it works).

mistergibson avatar Jan 07 '19 02:01 mistergibson

Same issue for me as @dougti . Using nextcloud 16.0.3 .xml works fine, .drawio does not

valkalon avatar Jul 20 '19 08:07 valkalon

I was able to get it to work using the instructions from the App's github page

To proceed, just copy /resources/config/mimetypemapping.dist.json to /config/mimetypemapping.json (in the config/ folder at Nextcloud’s root directory; the file should be stored next to the config.php file). Afterwards add the two following line just after the “_comment” lines. "drawio": ["application/x-drawio"],

If all other mimetypes are not working properly, just run the following command: sudo -u www-data php occ files:scan --all

topicomha avatar Nov 11 '19 05:11 topicomha

I'm experiencing an issue where xml files are no longer opened by drawio. I have been using xml files as Diagrams for months, but all of a sudden when I click it it gets sent to FF for download.

GideonWolfe avatar Nov 17 '19 20:11 GideonWolfe

You could check the settings and make sure the "Associate XML files with Draw.io?" setting is set to "Yes". You can find the setting in the "Additional Settings" (in the Administration Section) at the bottom of the left side menu on the "Settings" page.

chrome_RK8gNPkNQ7

topicomha avatar Dec 02 '19 00:12 topicomha

@topicomha Yes this setting was set to "Yes". I think their might have been an issue with the mimetypemapping file when I edited it to enable Keepweb. I have since migrated to a new server and it's all working great.

GideonWolfe avatar Dec 02 '19 18:12 GideonWolfe

Just clicking the "save" button resolves the issue for me. I think the issue can be closed or does anyone experience any further problems?

Axolord avatar Apr 25 '21 16:04 Axolord

Just clicking the "save" button resolves the issue for me. I think the issue can be closed or does anyone experience any further problems?

I had the same experience - I simply had to visit the "Additional Settings" page on my NC instance and hit "Save" - once I did that the association for .drawio files began working again. 🥳

bitops avatar Apr 17 '22 23:04 bitops

Changing a setting and clicking the save button doesn't work for me on NC 24.0.4.1.

  • When clicking a .drawio file in the files app it's opened with the drawio app correctly.
  • When clicking on a share link for a shared .drawio file it only downloads the file.

@pawelrojek Can you reproduce the issue?

ghost avatar Sep 28 '22 13:09 ghost

Hi NC 24.0.6 DrawIO Integration 1.3 Firefox Ubuntu Latest

For me also XML files are sometimes not opened but presented as Plaintext XML files drawio files never opened yet Does someone know a workaround if draw.io and XML all do not work to open in editing embedded mode? Why is there no function in Nextcloud DrawIO Integration to right click and select Open/Edit in draw.io ?

EDIT: It is like a Randomizer, sometimes it works, sometimes not i just renamad a XML that opened as plaintext in Nextcloud to .DRAWIO AND pressed F5 for refreshing the browser and now the draw.io was opened

maybe it is some odd CACHE issue that is managed by nextcloud I recommend adding a context menu Edit in DrawIO

ghost avatar Oct 28 '22 09:10 ghost