Filetype Association - Files downloading instead of opening

Hello everyone,
I am testing the NextCloud product for the first time. Iā€™m running NC v11.0.1, using an external storage (swift) as my Primary Storage. Iā€™ve installed some Apps: Markdown Editor and Keeweb (on top of the original Text Editor).
When opening a MD or kdbx file with a freshly ā€˜enabledā€™ app, the file opens in the browser fine. After a couple tries, the kdbx file is downloaded instead and the MD file is opened in the regular text editor or downloaded. If I disable the app and re-enable it, it starts to work againā€¦ for a couple triesā€¦ and the problem comes back.

During my test, Iā€™ve also noticed that I had a couple MD files to cover multiple scenarios (e.g. empty file, some with actual content, etc.) and all the files would not open the same way: e.g. one would open in the Markdown Editor and another one in the regular Text Editor.

I couldnā€™t find any setting for the filetype/app association. I have found another similar case (Keeweb app is downloading kdbx file instead of opening in browser?), but disabling/enabling the app seems to have worked for the guy. In my case, it works only for a couple triesā€¦

Anyone with similar issues!?
Thanks!

1 Like

Ciao,
I donā€™t know the specific problem, but keep in mind that NC is a client-server service used with a internet browser.
Itā€™s up to the browser choose what to do with file opened with the mouse-click, so in this case I would try different browser to find out where the problem is (client side or server side)

Hello,

Iā€™m sorry but I donā€™t agree with you. The provided apps are NOT browser-apps. They are simply JavaScript code (e.g. The text editor) that is being run when clicking the file. When there is ā€œno matching appā€, then it should simply proceed with the download, which is THEN managed by the browser itself. It is up the NC to wither launch a script OR proceed with the download by providing a link to the browser.

Regards,
Max

Actually, I agree with you :slight_smile:
So you should check the log server, looking for some warning in apache or PHP log
(if you have activated them).
Itā€™s really a strange behaviour.

Iā€™ve done some tests today and found that:
When opening a kdbx (KeeWeb), I get one of the two cases:
"GET /remote.php/webdav/test1.kdbx HTTP/1.1"
"GET /index.php/apps/keeweb/config?file=/test.kdbx HTTP/1.1"
In the working case, there are some more requests (after) since it must generate some views and allā€¦

As you can guessā€¦ the ā€˜test1.kdbxā€™ is being downloaded and 'test.kdbx" is being opened in KeeWeb app. What I donā€™t get is ā€œwhat determines what link is going to be ā€œusedā€?ā€

For the Mardown issue, both files (ā€œanother.mdā€ not opening as a MD and ā€œmarkdown.mdā€ opening as a MD):
"GET /index.php/apps/files_texteditor/ajax/loadfile?filename=another.md&dir=%2F HTTP/1.1"
ā€œGET /index.php/apps/files_texteditor/ajax/loadfile?filename=markdown.md&dir=%2F HTTP/1.1ā€

I set the logs for nextcloud to ā€œdebugā€ and ā€¦ nothingā€¦ nothing more is generatedā€¦ I make sure is was well activated by testing a ā€œwrong passwordā€ and noticed a level 1 log (instead of only level 2+ logs)ā€¦ but other than that, nothing is being generated from the appsā€¦

any other advices?

I am having the same problem. I found it out once after I installed the next cloud with the .kdbx files. Turned out itā€™s doing it with all files. Any help would be appreciated!