owncloud / richdocuments

:notebook_with_decorative_cover: Collabora Online for ownCloud
116 stars 54 forks source link

How to set file handler app for .txt files #162

Open nobody4242 opened 7 years ago

nobody4242 commented 7 years ago

Hi all, after finally integrating Collabora/LibreOffice richdocuments into my ownCloud 9 setup everything works fine execpt that plain .txt files are also handled by the richdocuments app. I want to use the integrated owncloud plain old text editor for that. Where can i set this association, that on click txt files are not handled by libreoffice but by the owncloud text editor ?

(also setting other files handlers would be nice to know)

Please advice...

sergey-dryabzhinsky commented 7 years ago

Hi,

Best solution now is:

  1. Make your own fork
  2. Edit files js/viewer/viewer.js and lib/storage.php - comment out lines with text/plain.
  3. Push changes to your fork
  4. Do git clone https://github-url-to-your-fork richdocuments into owncloud apps directory

Parts 1, 3, 4 - is optional.

sergey-dryabzhinsky commented 7 years ago

I wander if owncloud can provide UI/methods to choose one of apps/handlers.

Like it is in Android - call provider via SIM/SIP.

cdamken commented 6 years ago

Edit files js/viewer/viewer.js and lib/storage.php - comment out lines with text/plain.

I tried this but did not work

sergey-dryabzhinsky commented 6 years ago

@cdamken May be you need to purge assets folder.

cdamken commented 6 years ago

@sergey-dryabzhinsky Do you mean this folder?:

/var/www/owncloud/assets# ls -la
total 8
drwxr-x---  2 www-data www-data 4096 Dec  8 19:38 .
drwxr-x--- 14 root     www-data 4096 Dec 14 13:11 ..
cdamken commented 6 years ago

Ifound the other one:

/var/www/owncloud/apps/richdocuments/assets# ls -la
total 80
drwxr-xr-x  2 www-data www-data  4096 Jan 26 14:36 .
drwxr-xr-x 11 www-data www-data  4096 Jan 26 14:36 ..
-rw-r--r--  1 www-data www-data 12323 Jan 26 14:36 docxtemplate.docx
-rw-r--r--  1 www-data www-data  8891 Jan 26 14:36 odttemplate.odt
-rw-r--r--  1 www-data www-data 35481 Jan 26 14:36 pptxtemplate.pptx
-rw-r--r--  1 www-data www-data  8113 Jan 26 14:36 xlsxtemplate.xlsx
root@snoopy3:/var/www/owncloud/apps/richdocuments/assets#

What should be removed there? I still want to use doc documents with collabora. I only want the txt to be excluded.

sergey-dryabzhinsky commented 6 years ago

The first one. But it's empty. Problem is somewhere else.

Try to:

  1. Flush php opcode cache - restart apache / fpm / cgi
  2. Cleanup all browser caches