项目作者: jfcherng-roundcube

项目描述 :
A Roundcube plugin which lets you view documents with cloud viewers.
高级语言: PHP
项目地址: git://github.com/jfcherng-roundcube/plugin-cloudview.git
创建时间: 2020-04-22T07:39:23Z
项目社区:https://github.com/jfcherng-roundcube/plugin-cloudview

开源协议:MIT License

下载


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.

  • Roundcube: 1.4.0, 1.6.0
  • PHP: 7.1.3 (min requirement), 8.1
  • Skin: Classic, Larry, Elastic

Different environments may work as well without guarantee.

How to install this plugin in Roundcube

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:
  1. <?php
  2. // some other codes...
  3. $config['plugins'] = array(
  4. // some other plugins...
  5. 'cloudview', // <-- add this
  6. );

Prerequisites

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

  • The temp/ directory under plugins/cloudview/temp/ should be public accessible.
  • Make sure the user running the RoundCube server has “write” permission to the temp/ directory.
  • Your RoundCube installation should be publicly accessible. I.e., not under an internal server.

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

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

For Developers

Compile Frontend Assets

  • You will need to have Node.js installed.
  • Install dependencies via npm install (or yarn if you prefer)
  • Compile assets with ./compile.sh

Acknowledgement