Home | Trees | Index | Help |
---|
|
Code for handling arbitrary file attachments. 'Attachment' is a base class for classes that represent arbitrary attachments. Each 'Attachment' object has these four attributes: 'mime_type' -- The MIME type of the attachment contents. This information enables user interfaces to handle attachment data in a sensible fasion. 'description' -- The user's description of the attachment contents. 'file_name' -- A file name associated with the description. This is usually the name of the file from which the attachment was originally uploaded or inserted. 'location' -- A string containing the external location of the attachment data. The semantics of this string are defined by implementations of 'AttachmentStore', which use it to locate the attachment's data. A special 'TemporaryAttachmentStore', with a different interface, is used to store attachment data temporarily, at most for the life of the program. The 'temporary_store' global instance should be used.
|
|||
Attachment | An arbitrary file attachment. | ||
AttachmentStore | Interface for classes which store attachment data. | ||
FileAttachmentStore | An attachment store based on the file system. | ||
TemporaryAttachmentStore | Temporary storage for attachment data. |
|
|||
make_temporary_location()
Return a unique location for temporary attachment data. |
|||
make_dom_node(attachment,
document)
Create a DOM element node for this attachment. |
|||
from_dom_node(node,
store)
Construct an attachment object from a DOM element node. |
|
|||
_temporary_location_prefix |
|
|
Create a DOM element node for this attachment. 'document' -- A DOM document node in which to create the element. returns -- A DOM element node. |
Construct an attachment object from a DOM element node. 'node' -- A DOM attachment element node. 'store' -- The associated attachment store. returns -- An attachment instance. The type is determined by 'attachment_class'. If the attachment object requires additional context information to interpret the location (if it's specified in the attachment element), the caller must provide it directly to the object. |
|
_temporary_location_prefix
|
Home | Trees | Index | Help |
---|
Generated by Epydoc 3.0alpha2 on Fri Sep 28 00:57:29 2007 | http://epydoc.sf.net |