Default to the more space-efficient binary encoding for newly encrypted files
instead of the traditional base64 encoding, eliminating the 33% overhead.
The new option 'encryption.use_legacy_encoding' allows to force the legacy
encoding format if needed. Files encoded in the old format remain readable.
Based on https://github.com/owncloud/encryption/pull/224 and
https://github.com/owncloud/core/pull/38249 by karakayasemi.
Signed-off-by: plumbeo <plumbeo@users.noreply.github.com>
Respect user settings in php.ini if they are big enough
In the admin guide:
* https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html
it is mentioned that you can tweek:
* max_input_time
* max_execution_time
in order to enable larger file uploads. However, the current codebase
will hard code these values to one hour, no matter what the user sets in
php.ini.
This patch will allow the user to set these settings in php.ini and they
will be respected, if and only if, they are set to something bigger than
3600 seconds.
Signed-off-by: Micke Nordin <kano@sunet.se>
Allow compatibility wrapper on local external storage
The check was likely in place to prevent adding the wrapper on the root
and home storage, which is not possible anyway since the encoding option cannot
be set on that mount.
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Use a lazy user for the file owner when listing a directory
Only getUID and getDisplayName are called on the file owner objects anyway
and we can get this information often without DB request
Signed-off-by: Robin Appelman <robin@icewind.nl>
Previously we were listening to change in the appdata folder but an
appdata scan didn't setup the file system, so the view was unavailable.
**Test plan:**
1. rm -rf data/appdata_...../preview data/<user>/Media
2. occ files:scan-app-data
3. occ files:scan <user>
No errors and the files and metadata are correctly removed from the
database too.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
This should saves some query in the share backend when displaying the
owner and it's not important if the display name is 10 minutes outdated
as it is very rare that this gets changed.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>