You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upload a unknown file extension like file.cs or file_x.aspx
Click the file you uploaded
It will download, but it should open in an editor...
Expected behaviour
I'd expect there would be an interface for adding file extensions which would open custom file types in text/code editor.
The expected files should open in an editor. But there is no way to add custom file extensions manually through the Nextcloud web interface, and have them files open in an editor, instead of bring forced to download.
Actual behaviour
The file clicked will start downloading, instead of opening in a text editor. There isn't any menu option to open with text editor either.
UBuntu 18.04:
Web server:
Database: MySQL 5.7.31
PHP version: 7.2.33
Nextcloud version: 19 (see Nextcloud admin page)
Client configuration
Browser: Opera
Operating system: Ubuntu 18.04
The text was updated successfully, but these errors were encountered:
You can set file extensions to treat as text files by mapping the file extension to a mime type in Nextcloud.
This is not defined by Texteditor but in Nextcloud.
Create (or edit) a file named <nextcloud>/config/mimetypemapping.json and add your mappings, eg.:
{
"aspx": ["text/code"],
"cs" : ["text/code"]
}
Update Nextcloud's mapping (run with your www-data user):
$ php occ maintenance:mimetype:update-js
Important! Rescan your files to apply changes to existing files (run with www-data user):
-## Steps to reproduce
Expected behaviour
I'd expect there would be an interface for adding file extensions which would open custom file types in text/code editor.
The expected files should open in an editor. But there is no way to add custom file extensions manually through the Nextcloud web interface, and have them files open in an editor, instead of bring forced to download.
Actual behaviour
The file clicked will start downloading, instead of opening in a text editor. There isn't any menu option to open with text editor either.
UBuntu 18.04:
Web server:
Database: MySQL 5.7.31
PHP version: 7.2.33
Nextcloud version: 19 (see Nextcloud admin page)
Client configuration
Browser: Opera
Operating system: Ubuntu 18.04
The text was updated successfully, but these errors were encountered: