jfcherng-roundcube / plugin-cloudview

A Roundcube plugin which lets you view documents with cloud viewers.
https://packagist.org/packages/jfcherng-roundcube/cloudview
MIT License
10 stars 5 forks source link
cloud-viewers plugin preview roundcube roundcube-plugin

Roundcube Plugin: Cloud View

GitHub Actions GitHub Actions Packagist Packagist Version Project license GitHub stars Donate to this project using Paypal

A Roundcube plugin which lets you directly view mail attachments in the browser with cloud viewers like Google Docs or Microsoft Office Web.

cover

Click me to see the user settings page

Viewers & Supported Formats

3rd-party Viewers

Viewer Supported Formats
Google Docs doc, docx, xls, xlsx, ppt, pptx, rtf
Microsoft Office Web doc, docx, xls, xlsx, ppt, pptx, odt, ott, ods, ots, odp, otp
StackEdit md

Self-hosting Viewers

Viewer Supported Formats
HTML JS htm, html
Markdown JS md
PDF JS pdf
PSD JS psd

Requirements

This plugin is tested in the following environment.

Different environments may work as well without guarantee.

How to install this plugin in Roundcube

Install via Composer (Recommended)

This plugin has been published on Packagist by the name of jfcherng-roundcube/cloudview.

  1. Go to your ROUNDCUBE_HOME (i.e., the root directory of your Roundcube).
  2. Run composer require jfcherng-roundcube/cloudview.
  3. Copy config.inc.php.dist to config.inc.php and edit config.inc.php if you want.

Install manually

  1. Create folder cloudview in ROUNDCUBE_HOME/plugins if it does not exist.
  2. Copy all plugin files there.
  3. Copy config.inc.php.dist to config.inc.php and edit config.inc.php if you want.
  4. Edit ROUNDCUBE_HOME/conf/config.inc.php locate $config['plugins'] and add 'cloudview', there:
<?php

// some other codes...

$config['plugins'] = array(
    // some other plugins...
    'cloudview', // <-- add this
);

Prerequisites

This plugin will extract attachments from messages into plugins/cloudview/temp/ so that remote cloud viewers can publicly access them.

Temporary Files

Those temporary files under plugins/cloudview/temp/ will not be deleted automatically. You will need to setup a cron job to periodically delete them.

For example, execute crontab -e and add the following job

# delete temporary files on 03:00 AM every day
0 3 * * * rm -rf PATH_TO_ROUNDCUBE/plugins/cloudview/temp/*/

For Developers

Compile Frontend Assets

Acknowledgement