files_texteditor icon indicating copy to clipboard operation
files_texteditor copied to clipboard

Perl mimetype

Open Trevelian opened this issue 8 years ago • 2 comments

Hello,

  1. Create "foo.pl" in Nextcloud, write some code, close it.
  2. Open it again, its not open in the editor but propose to download

Expected behaviour

Perl script should be opened with the editor

Actual behaviour

Perl script is just proposed to download

Server configuration

Operating system: Archlinux Web server: Apache Database: Mariadb PHP version: 7.1 Nextcloud version: (see Nextcloud admin page) 12.0.1 Where did you install Nextcloud from: from nextcloud.com

Possible resolution

https://github.com/nextcloud/files_texteditor/blob/master/js/editor.js#L250

Changing 'application/x-pearl', to 'application/x-perl', seems to fix the issue, maybe just a typo ?

Thanks, Trevelian.

Trevelian avatar Aug 10 '17 16:08 Trevelian

For now, there is an inconsistency for Perl files.

  • Create test.pl in folder test1 : it open in file editor
  • Close, move to folder test2
  • Go in folder test1, try to open test.pl : it download the file, no way to edit
  • Rename test.pl to test.txt
  • Go in test2
  • Go in test1, rename test.txt to test.pl : the file open in text editor as long as you stay in this folder

If Trevelian fix work (can't test for now), can we do a pull request to fix that ?

Thanks.

Mormuig avatar Apr 13 '18 07:04 Mormuig

Fixed by #98

rullzer avatar Aug 15 '18 18:08 rullzer