Attachments

There is some discussion in CalDAV regarding attachments. Any implementation needs to be compatible with that. In particular, we need to apply access control for inline attachments and possibly provide repository space for attachments and other resources.

A full implementation is going to require some schema changes - mostly to the attachment tables itself rather than the objects to which they are attached.

We need to implement a resources folder which is within the calendar collection. This folder will be created automatically when attachments or other resources are stored. It will be accessible via a GET.

The attachments object will contain a flag indicating this is an inline attachment. That allows us to (re)deliver the event with the attachment inline. All others will be delivered as a url.

We offer users the option of storing the attachment in the resources folder so that access rules apply.

The attachment object itself will have a name, owner, access etc - all the usual contained, owned object stuff.

When the events getAttachments method is called we will get the information about the attachment including the url. To retrieve the attachment itself we call the get method for the (not yet defined) attachments handler or simply present the url to the client as a link.