The life cycle of an attachment explains the process of creating, sending, storing, and deleting an attachment from the Calendar Server. The following example illustrates the life cycle of an attachment by explaining the procedure to attach a file from your system and delete it in the Calendar Server:
Click the New Event link in the Calendar, to create a new event in the Communications Express.
The New Event window opens up. You need to specify the event details such as Title, Start Time, End Time, Type, Privacy, people to invite and so on for the new event.
Click Add Attachment icon in the Attachments section, to add file as an attachment.
The Attach File window opens up.
Click the Browse button.
Select the file that you want to attach from the File Upload dialog box.
Click the Add icon to add the file in the attachments list.
You can see the name and size of the file in the attachments list. You can add multiple attachments to the list by clicking the Browse button and selecting the required files. You can also delete the selected attachments from the list by clicking the Delete icon in the Action tab.
Click the Attach icon to add the selected attachments in the Attachments list box in the New event window.
Click the Save icon to save the attachment.
The saved attachment is displayed as an event against the corresponding timing in the Calendar.
Calendar Server issues storeevents.wcap command, which provides all the information about the attachment. Calendar Server stores the attachment file in the attachment store and keeps a reference to the attachment within the event structure. For more information on the storeevents command, refer the storeevents.wcap section.
Click the event at any point of time to view its details.
Communications Express issues the fetchevents_by_id and provides the Calendar Server with all the information about the attachment. It also sends fetchattach=0. For more information on fetchevents_by_id command, refer the fetchevents_by_id.wcap section. In response to the fetchevents_by_id command, the server provides information about the attachment such as attachment id, size of attachment, URL to retrieve the attachment, client id if any was supplied, the file name of the original file attached and so on.
The client displays the attachment in the form of a URL.
Click the URL to view the attached file.
Communications Express issues fetchattachment.wcap command to the server. The server sends back the data about the attachment in the form of HTTP response.
Delete the attachment (at any point of time) from the event.
Communications Express issues the storeevents command and supplies the deleteid parameter along with it. The deleteid parameter contains the ID of the attachment to be deleted. The server deletes the attachment from the back-end attachment store.