files_mindmap
files_mindmap copied to clipboard
.KM files will not open - download only
You can create a new mind map file, but when trying to access it after saving you are only provided the option to download.
Using version 0.0.20 on NextCloud 18.0.2
Sorry, I can't reproduce.
We have disabled the app for now because our users are not able to open the mind map files. It always comes up as a download instead of opening. I can only advise we are using Nextcloud 18.0.2 on CentOS 7 fully patched with PHP 7.2.
----- Original message ----- From: "ACTom" [email protected] To: "ACTom/files_mindmap" [email protected] Cc: "Reid Canavan" [email protected], "Author" [email protected] Subject: Re: [ACTom/files_mindmap] .KM files will not open - download only (#98) Date: Tue, Mar 17, 2020 2:18 PM
Sorry, I can't reproduce.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Is your nextcloud directory read-only? When the app is installed, you need to update the mimetype configuration of nextcloud. The app will create two files in the config directory, and then call the internal update-js command to update the two files under core / js, or you can try the following two manually after installing the app: Article execution:
occ maintenance: mimetype: update-js
occ files: scan
I was able to open newly created km files but not ones created from previous versions. The steps above resolve this for me, thanks!
Consider adding this to documentation.
I can confirm that this works for me as well.
----- Original message ----- From: "ACTom" [email protected] To: "ACTom/files_mindmap" [email protected] Cc: "Reid Canavan" [email protected], "Author" [email protected] Subject: Re: [ACTom/files_mindmap] .KM files will not open - download only (#98) Date: Tue, Mar 17, 2020 11:53 PM
Is your nextcloud directory read-only? When the app is installed, you need to update the mimetype configuration of nextcloud. The app will create two files in the config directory, and then call the internal update-js command to update the two files under core / js, or you can try the following two manually after installing the app: Article execution: occ maintenance: mimetype: update-js occ files: scan
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
same problem for me
@Deltachaos Did ACTom's fix help you?
Is your nextcloud directory read-only? When the app is installed, you need to update the mimetype configuration of nextcloud. The app will create two files in the config directory, and then call the internal update-js command to update the two files under core / js, or you can try the following two manually after installing the app: Article execution:
occ maintenance: mimetype: update-jsocc files: scan
This solution saved my life!
Same problem here, after updating to 18.x we can create mind maps but not open them again later, it just downloads the file.
Old mind maps still working well, but the new ones can't be opened again after creating it
Centos 7 Php 7.3 PostgreSQL 11 Nextlcoud 18.0.3
@gustavotero7 did you try the fix that several people said works for them?
Hmmm, I ran the two strings above and the server accepted them but the problem persists. .km files are still downloaded instead of opened in the browser.
Nextcloud 18.0.2
sudo -u www-data php /var/www/box.laurin.xyz/occ files:scan -all sudo -u www-data php /var/www/box.laurin.xyz/occ maintenance:mimetype:update-js
Ideas?
@flaurin Is your config directory read-only? When installing this app, two files will be created in the config directory: mimetypealiases.json and mimetypemapping.json. Please check whether these two files exist. If not, please add them manually. The code is as follows:
mimetypealiases.json
{ "application/km": "mindmap", "application/x-freemind": "mindmap", "application/vnd.xmind.workbook": "mindmap" }
mimetypemapping.json:
{ "km": [ "application/km" ], "mm": [ "application/x-freemind" ], "xmind": [ "application/vnd.xmind.workbook" ] }
Then execute the above two commands.
Thanks so much for that. Now it works to open new and old .km files in the browser. (Se below what I did) BUT, a new problem has occured: .km files that are SHARED with a link do not open. Im getting "Internal server error" when trying to open the links on another computer. Links created on OTHER files opens fine after sharing so its something to do with .km och the directories.
Ideas?
This is what I did: sudo nano /var/www/SERVERURL/config/mimetypealiases.json { "application/km": "mindmap", "application/x-freemind": "mindmap", "application/vnd.xmind.workbook": "mindmap" }
sudo nano /var/www/SERVERURL/config/mimetypemapping.json { "km": [ "application/km" ], "mm": [ "application/x-freemind" ], "xmind": [ "application/vnd.xmind.workbook" ] }
Run: sudo -u www-data php /var/www/SERVERURL/occ files:scan --all and sudo -u www-data php /var/www/SERVERURL/occ maintenance:mimetype:update-js
@ACTom Did you see my post above? Im really impressed with this app (having worked with MANY during the years, far more complicated) and would deeply appreciate any hints on how to solve the sharing problem of the .km files. Thx!
Thanks so much for that. Now it works to open new and old .km files in the browser. (Se below what I did) BUT, a new problem has occured: .km files that are SHARED with a link do not open. Im getting "Internal server error" when trying to open the links on another computer. Links created on OTHER files opens fine after sharing so its something to do with .km och the directories.
Ideas?
This is what I did: sudo nano /var/www/SERVERURL/config/mimetypealiases.json { "application/km": "mindmap", "application/x-freemind": "mindmap", "application/vnd.xmind.workbook": "mindmap" }
sudo nano /var/www/SERVERURL/config/mimetypemapping.json { "km": [ "application/km" ], "mm": [ "application/x-freemind" ], "xmind": [ "application/vnd.xmind.workbook" ] }
Run: sudo -u www-data php /var/www/SERVERURL/occ files:scan --all and sudo -u www-data php /var/www/SERVERURL/occ maintenance:mimetype:update-js
This worked for me, too! @ACTom I advise to create these mimetype-entries by default. This solves the bug :-)
//edit:
My folder /core/js has the following persmissions:

Is your nextcloud directory read-only? When the app is installed, you need to update the mimetype configuration of nextcloud. The app will create two files in the config directory, and then call the internal update-js command to update the two files under core / js, or you can try the following two manually after installing the app: Article execution:
occ maintenance: mimetype: update-jsocc files: scan
I have this same problem. But if I read this solution I do not understand a word. Could someone translate this for me?
ok, the first part I still don't understand, but now I just went for the "manual way" as, after a couple of duckduckgo's I found out what occ actually is and so after a few other duckduckgo's I came up with the follwoing:
(I use a RaspberryPi with NextcloudPi 18.0.4)
login to my NCPI with SSH
enter the following command:
sudo -u www-data php /var/www/nextcloud/occ maintenance:mimetype:update-js
Output:
mimetypelist.js is updated
enter the following command:
sudo -u www-data php /var/www/nextcloud/occ files:scan --all
Output
Starting scan for user 1 out of 5 (USER1) Starting scan for user 2 out of 5 (USER2) Starting scan for user 3 out of 5 (USER3) Starting scan for user 4 out of 5 (USER4) Starting scan for user 5 out of 5 (USER5)
The scan takes quite long. It seems to have worked, I can open .km files now. BUT, the .km files are all empty, I did not write much yet, but it's all lost. If I edit them now, close the file and reopen it, it's all still there. So from that sde all is fine.
Did I do everything correct? Anything else I need to do?
Chiming in to say I'm also having the same issue - clicking the .km file gives me the download prompt instead of opening the editor.
Running the commands posted "fixed" the issue, at the cost of erasing all previously-created mind maps. Looks like I cannot recover existing mind maps somehow, the file is now 1 byte and NextCloud doesn't have any previous version that are more than 1 byte...