texxasrulez / rounddav_files
Roundcube plugin to enable RoundDAV Attachments and provides a File page linked to your Files page.
Installs: 0
Dependents: 0
Suggesters: 1
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:roundcube-plugin
pkg:composer/texxasrulez/rounddav_files
Requires
- php: >=7.4
- texxasrulez/rounddav_provision: >=0.0.1
README
WebDAV Files integration for Roundcube, powered by RoundDAV.
This plugin adds a Files tab to Roundcube and lets users attach files directly from their RoundDAV storage into email messages.
This plugin requires RoundDAV Server to function.
Check out the Suite README to see what is entailed.
Features
- Adds a Files entry to Roundcube's main menu
- Embeds the RoundDAV Files UI inside an iframe
- Uses SSO from
rounddav_provision(no extra login) - Adds an Attach from RoundDAV button in the compose window
- Works with Elastic and Larry-based skins (including variants)
- Respects Roundcube's layout and styling conventions
Installation
- Copy plugin into Roundcube:
roundcube/plugins/rounddav_files/
- Enable it in Roundcube config:
$config['plugins'][] = 'rounddav_files';
- Configure URLs in
config.inc.phpor your main config:
// Where the iframe should point to for the Files UI. // %u will be replaced with the URL-encoded Roundcube username. $config['rounddav_files_url'] = 'https://your.server/rounddav/public/files/?user=%u'; // (Optional) Endpoint for attachment operations if you implement them as a RoundDAV API $config['rounddav_attach_url'] = 'https://your.server/rounddav/public/api.php?r=attach';
UI Integration
Files Tab
The plugin:
- Registers a new task:
rounddav_files - Adds a Files icon/entry in the Roundcube main menu
- Loads a template that embeds the RoundDAV
/public/files/UI inside an iframe
Example Elastic template snippet:
<roundcube:include file="includes/layout.html" /> <roundcube:include file="includes/menu.html" /> <h1 class="voice"><roundcube:label name="rounddav_files.files" /></h1> <div id="layout-content" class="selected" role="main"> <div class="iframe-wrapper"> <roundcube:object name="rounddav_files_frame" id="rounddav-files-frame" src="env:blankpage" title="arialabelrounddavfilescontent" /> </div> </div> <roundcube:include file="includes/footer.html" />
Compose Window
The plugin injects a small Attach from RoundDAV button inside the attachments area of the compose screen. The header-level button is intentionally hidden to avoid clutter.
When clicked:
- Opens the Files UI (either embedded or as a modal / separate window depending on your setup).
- Lets the user pick files from their RoundDAV storage.
- Posts the selected files back to Roundcube using a plugin action to turn them into real message attachments.
SSO Behavior
rounddav_files integrates with rounddav_provision through $_SESSION:
-
After login,
rounddav_provisionstores a one-shot SSO URL in:$_SESSION['rounddav_sso_login_url']
-
When rendering the Files iframe,
rounddav_files:- Checks
$_SESSION['rounddav_sso_login_url']. - If present:
- Uses that value as the iframe
src. - Unsets it to avoid reuse.
- Uses that value as the iframe
- If not present:
- Falls back to
rounddav_files_url(with%ureplaced by the username).
- Falls back to
- Checks
This means:
- First visit after login → automatic SSO via
/sso_login.php - Later visits → direct Files URL (as long as the RoundDAV session is still valid)
Logging
The plugin logs to the roundcube log channel when it decides which URL to use for the iframe, e.g.:
rounddav_files: using SSO URL for iframe src: ...rounddav_files: using fallback files URL template=... for user=...
These messages are helpful when debugging SSO behavior.
Philosophy
Webmail without file storage feels incomplete.
rounddav_files is the missing piece that lets Roundcube act like a modern client: email, calendars, contacts, and files, all with one login.