├── .gitignore ├── README.md ├── chrome.manifest ├── chrome ├── content │ ├── icon.png │ ├── management.js │ ├── management.xhtml │ ├── nextcloud.png │ ├── settings.js │ └── settings.xhtml └── locale │ ├── de │ ├── management.dtd │ └── settings.dtd │ ├── en │ ├── management.dtd │ └── settings.dtd │ ├── es │ ├── management.dtd │ └── settings.dtd │ ├── fr │ ├── management.dtd │ └── settings.dtd │ ├── nl │ ├── management.dtd │ └── settings.dtd │ └── pl │ ├── management.dtd │ └── settings.dtd ├── components └── nsOwncloud.js └── install.rdf /.gitignore: -------------------------------------------------------------------------------- 1 | /nbproject/ 2 | /build.xml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Deprecated 2 | This plugin is now deprecated in favor of https://github.com/nextcloud/nextcloud-filelink 3 | 4 | # ownCloud/nextCloud for Filelink 5 | Development: GVJ Web Sites & Consulting - http://www.viguierjust.com 6 | 7 | ## Description 8 | ownCloud/nextCloud for Filelink makes it easy to send large attachments by uploading those attachments to any ownCloud or nextCloud server and inserting a link to the file into the body of your email. 9 | 10 | ownCloud/nextCloud are popular storage services, and this add-on allows Filelink to make use of them. 11 | 12 | ## Installation 13 | 1a) Download the provided .xpi release 14 | 15 | OR 16 | 17 | 1b) Download the provided .xpi.zip release and unzip it 18 | 19 | OR 20 | 21 | 1c) Zip all files from this repository such that the install.rdf and chrome.manifest are located in the root folder of the zip file. Change the file extension from .zip to .xpi. 22 | 23 | 2) Open your Thunderbird, navigate to Tools->Add-Ons, choose "Install Add-On From File..." and select the .xpi file. After installation restart your thunderbird. 24 | 25 | 3) Make sure that you have checked "Allow users to share via link" in **"Sharing"** section in your ownCloud/nextCloud admin page. If you also have **"Enforce password protection"** checked, make sure to fill **"Password for uploaded files"** field in next step 26 | 27 | 4) Navigate to Edit->Preferences->Attachments and add an online storage on the outgoing tab. Select ownCloud from the list and type in your ownCloud url/credentials. If you want to save the attachments not in the root folder of your ownCloud account, then you have to modify the storage path, e.g. use "/mail_attachments/" if you want to save all attachments in the folder named mail_attachments. 28 | 29 | 5) After setting up the account Thunderbird will ask you if you want to upload big mail attachments to ownCloud. 30 | 31 | ## Requirements 32 | * ownCloud/nextCloud: 5.0.13 and newer 33 | * Thunderbird: 13.0 and newer 34 | -------------------------------------------------------------------------------- /chrome.manifest: -------------------------------------------------------------------------------- 1 | content owncloud chrome/content/ 2 | locale owncloud en chrome/locale/en/ 3 | locale owncloud fr chrome/locale/fr/ 4 | locale owncloud pl chrome/locale/pl/ 5 | locale owncloud de chrome/locale/de/ 6 | locale owncloud nl chrome/locale/nl/ 7 | locale owncloud es chrome/locale/es/ 8 | component {ad8c3b77-7dc8-41d1-8985-5be88b254ff3} components/nsOwncloud.js 9 | contract @mozilla.org/mail/owncloud;1 {ad8c3b77-7dc8-41d1-8985-5be88b254ff3} 10 | category cloud-files Owncloud @mozilla.org/mail/owncloud;1 -------------------------------------------------------------------------------- /chrome/content/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/guillaumev/owncloud_for_filelink/d8c292af7ca328377aa51c9559a73936697b7413/chrome/content/icon.png -------------------------------------------------------------------------------- /chrome/content/management.js: -------------------------------------------------------------------------------- 1 | /* This Source Code Form is subject to the terms of the Mozilla Public 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 | 5 | function onLoadProvider(provider) { 6 | let messenger = Components.classes["@mozilla.org/messenger;1"] 7 | .createInstance(Components.interfaces.nsIMessenger); 8 | 9 | let fileSpaceUsed = document.getElementById("file-space-used"); 10 | fileSpaceUsed.textContent = messenger.formatFileSize(provider.fileSpaceUsed); 11 | let fileSpaceUsedSwatch = document.getElementById("file-space-used-swatch"); 12 | fileSpaceUsedSwatch.style.backgroundColor = pv.Colors.category20.values[0]; 13 | 14 | let remainingFileSpace = document.getElementById("remaining-file-space"); 15 | remainingFileSpace.textContent = messenger.formatFileSize( 16 | provider.remainingFileSpace); 17 | let remainingFileSpaceSwatch = document.getElementById("remaining-file-space-swatch"); 18 | remainingFileSpaceSwatch.style.backgroundColor = pv.Colors.category20.values[1]; 19 | 20 | let totalSpace = provider.fileSpaceUsed + provider.remainingFileSpace; 21 | let pieScale = 2 * Math.PI / totalSpace; 22 | 23 | let spaceDiv = document.getElementById("provider-space-visuals"); 24 | let vis = new pv.Panel().canvas(spaceDiv) 25 | .width(150) 26 | .height(150); 27 | vis.add(pv.Wedge) 28 | .data([provider.fileSpaceUsed, provider.remainingFileSpace]) 29 | .left(75) 30 | .top(75) 31 | .innerRadius(30) 32 | .outerRadius(65) 33 | .angle(function(d) d * pieScale); 34 | 35 | vis.add(pv.Label) 36 | .left(75) 37 | .top(75) 38 | .font("14px Sans-Serif") 39 | .textAlign("center") 40 | .textBaseline("middle") 41 | .text(messenger.formatFileSize(totalSpace)); 42 | 43 | vis.render(); 44 | } 45 | -------------------------------------------------------------------------------- /chrome/content/management.xhtml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | %htmlDTD; 8 | %managementDTD; 9 | %owncloudDTD; 10 | ]> 11 | 12 | 13 |