Download the PHP package bennet0496/nextcloud_attachments without Composer
On this page you can find all versions of the php package bennet0496/nextcloud_attachments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download bennet0496/nextcloud_attachments
More information about bennet0496/nextcloud_attachments
Files in bennet0496/nextcloud_attachments
Package nextcloud_attachments
Short Description Upload large attachments to Nextcloud and automatically create share link
License MIT
Informations about the package nextcloud_attachments
Nextcloud Attachments for Roundcube
Upload large attachments to Nextcloud and automatically create share link.
Files that exceed $config['max_message_size']
/1.33 will automatically be uploaded to
the configured nextcloud server and linked in the email body. If the user has 2FA
configured in Nextcloud, the plugin will ask to log in to create an app password.
This plugin is meant for environment where users have the same login for email and Nextcloud, e.g. company Installations
Config
The plugin itself has a handful core settings. The server, the username strategy and the sub folder.
However, it also depends on the general config
Files larger than that will/must be uploaded to Nextcloud, so you should set it to
the desired value. With the following two additional options you can control the behavior
of the plugin. Should it behave like Google Mail and automatically without any further
user input, or should it behave like Outlook.com with a soft-limit suggesting the user to upload
and forcing them when the hard limit $config['max_message_size']
is reached
Remember, you will need to modify post_max_size
and upload_max_filesize
in your php.ini
to allow large uploads in general
__When enabling the plugin make sure to place it before any other attachment plugins like filesystem_attachments
__ E.g.
Nextcloud Brute-Force protection
By default this plugin, tests whether it can use the mail credentials for the Nextcloud login. If lots of users can't login with their mail credentials to Nextcloud, e.g., due to high adoption of 2FA or a high percentage of user that are denied form using Nextcloud (via LDAP groups or smth), this will inevatably lead to Nextcloud locking out the Roundcube server because it considers these logins, as login brutforce attempts.
You can disable the behavior of trying the mail password since version 1.3
However you might also want to consider, adding you Roundcube server to the Brutforce allow-list of the Nextcloud server. To do that you have to enable the bruteforce settings app and then as an administrator, unter Setting and Security, add your Server's IP to the allow list.
Excluding users
You can also exclude users from being able to interact with the plugin, which can be useful if they either won't be able to use the cloud anyway, have a small quota or can't share link or what ever might be the reason, that they should be unable to share file links.
There are 4 strategies to exclude users. The first and most straight forward one is the direct exclude list
If either their, IMAP (login) username, email or mapped username matches an entry in the list, they won't be able to use the plugin (version <1.3 only matched the login usernames).
The other 3 strategies (only available in version >=1.3) involve using address books, which essentially allow retrieving the status from LDAP. Which is useful because that has probably the information who can log in where anyway. Option one is to exclude any user listed with their uid or email in a given address book, allowing you to create a (hidden) address book that filters the users that should not be able to use the plugin
You can create a hidden address book by setting its hidden value in the global config.
Option 2 is to exclude users with a specific mapped value in an address book. Allowing you that if you have a public
address book anyway to map a value instead of creating a new address book. This is particularly using with directory
server supporting the memberOf
overlay to directly indicate group memberships in the user entry, however currently
this may or may not work with multivalued attributes.
Add a mapped value with the fieldset
as shown above.
And Option 3 is to exclude users that are in a specific group, when group mapping is set up for the address book.
You can set up group mapping in the global LDAP config.
Planned Features
- [ ] Give the option for (additional) user specific Nextcloud servers
- [ ] Wrap WebDAV request for easier adaptation to other Servers
- [ ] Allow to define global user
- [ ] Translatable attachment template
- [ ] Translate to more languages
- [x] Add folder to
sync-exclude.lst
to prevent desktop clients from (automatically) downloading the folder
Credits
- Icons for Attachment body
- Ubuntu Yaru (CC BY-SA 4.0)
- Material Icons (Apache License 2.0)
- HTTP library: Guzzle HTTP (MIT)
- Loading Animation: decode
- HTML minimization: StackOverflow
All versions of nextcloud_attachments with dependencies
ext-simplexml Version *
ext-json Version *
ext-intl Version *
ext-openssl Version *
roundcube/plugin-installer Version ^0.3
guzzlehttp/guzzle Version ^7.8