Introduce new global variable to control maximum size of carddav resources.

This commit is contained in:
“Paul 2018-08-30 17:23:12 +02:00
parent 9a430130d8
commit c5891abc7f
4 changed files with 14 additions and 1 deletions

View File

@ -171,6 +171,17 @@ $c->admin_email ='calendar-admin@example.com';
// $c->home_calendar_name = 'calendar';
// $c->home_addressbook_name = 'addresses';
/**
* Sets a numeric value indicating the maximum size in octets (bytes) of a resource
* that the server is willing to accept when an address object resource is stored
* in an address book collection (e.g. contacts with image attachments).
* Note that not all clients respect that property and that DAViCal won't deny creating
* or updating a resource that is larger than the specified limit if the client willingly or
* unwillingly ignores that property. Currently (late 2018) we only know of iOS devices to handle it properly.
* Default: 6550000
*/
// $c->carddav_max_resource_size = 6550000;
/**
* If the above options are not suitable for your new users, use this to create
* a more complex default collection management.

View File

@ -83,6 +83,7 @@ $c->permission_scan_depth = 2;
$c->expand_pdo_parameters = true;
$c->home_calendar_name = 'calendar';
$c->home_addressbook_name = 'addresses';
$c->carddav_max_resource_size = 6550000;
$c->enable_row_linking = true;
$c->enable_scheduling = false;
$c->http_auth_mode = 'Basic';

View File

@ -1842,7 +1842,7 @@ EOQRY;
case 'urn:ietf:params:xml:ns:carddav:max-resource-size':
if ( ! $this->_is_collection || !$this->_is_addressbook ) return false;
$reply->NSElement($prop, $tag, '' );
$reply->NSElement($prop, $tag, $c->carddav_max_resource_size );
break;
case 'urn:ietf:params:xml:ns:carddav:supported-address-data':

View File

@ -83,6 +83,7 @@ $c->permission_scan_depth = 2;
$c->expand_pdo_parameters = true;
$c->home_calendar_name = 'calendar';
$c->home_addressbook_name = 'addresses';
$c->carddav_max_resource_size = 6550000;
$c->enable_row_linking = true;
$c->enable_scheduling = false;
$c->http_auth_mode = 'Basic';