Repository navigation
Show all text files #1756
Description
Activity
It is perfectly fine to do it via the file extension, since we do it this way: https://github.com/nextcloud/android/blob/master/src/main/java/com/owncloud/android/utils/MimeTypeUtil.java#L478
All the extensions you mention aren't mapped at this moment that is why they are treated as "file" which basically means no in-app logic.
@tobiasKaminsky @mario @MorrisJobke what do you think? I am fine with adding these file extensions but would suggest that this should then be done consistently so that the server would also treat them as text files.
- addedneeds infoWaiting for info from user(s). Issues with this label will auto-stale.Waiting for info from user(s). Issues with this label will auto-stale.
on Nov 7, 2017 @tobiasKaminsky @mario @MorrisJobke what do you think? I am fine with adding these file extensions but would suggest that this should then be done consistently so that the server would also treat them as text files.
In the server we have a list of allowed mime types: https://github.com/nextcloud/files_texteditor/blob/master/js/editor.js#L239-L249
And we extend them with the markdown editor:
@MorrisJobke but would the mapping https://github.com/nextcloud/server/blob/master/resources/config/mimetypemapping.dist.json be the first place as to even identify the mentioned extensions as text? So In order to have them recognized the mapping would have to be extended.
@MorrisJobke but would the mapping https://github.com/nextcloud/server/blob/master/resources/config/mimetypemapping.dist.json be the first place as to even identify the mentioned extensions as text? So In order to have them recognized the mapping would have to be extended.
Yes - but I would say fixing the server also should be our first priority. If there is an issue with that we should address it in the server and not place another workaround ontop of it in the Android app (because this is then also needed in the web UI and iOS app)
Yes - but I would say fixing the server also should be our first priority.
Absolutely agree with you. Does that imply with your code references that you would add support for the mentioned file extensions.
Absolutely agree with you. Does that imply with your code references that you would add support for the mentioned file extensions.
Open a ticket in server and we can have a look.
@MorrisJobke created a referencing server issue nextcloud/server#7098
Another common text file type: .ini, and .sh
I'm sure there are lot of other (nearly all "dotfiles" for example), thats why I said that maybe doing it by whitelisting all files extension might not be the best solution.
Actual behaviour
The clients shows .txt and .md file with an internal editor.
AFAIK the client looks at the file extension before deciding how to open it.
Expected behaviour
All text (or at least a wider range of text files) files should be viewable from the client.
Steps to reproduce
Environment data
Android version: 5.1.1
Device model:
Stock or customized system: Customized
Nextcloud app version: 2.0.1, from FDroid
Nextcloud server version: 12
I know that one cannot simply determine from the file extension if a file is a text file or not, maybe the best option would be to give the user the possibility to choose if the file extension/file type is not recognized.
On the other hand, I think that some formats, like .adoc for asciidoc, are only used for text files, it may be therefore safe to open them automatically with the internal editor, like for .md files.