Back to index

plone3  3.1.7
Classes | Functions | Variables
CMFDefault.Image Namespace Reference

Classes

class  Image

Functions

def addImage

Variables

tuple ImageFactory = Factory(Image)

Function Documentation

def CMFDefault.Image.addImage (   self,
  id,
  title = '',
  file = '',
  content_type = '',
  precondition = '',
  subject = (),
  description = '',
  contributors = (),
  effective_date = None,
  expiration_date = None,
  format = 'image/png',
  language = '',
  rights = '' 
)
    Add an Image

Definition at line 54 of file Image.py.

00054 
00055             ):
00056     """
00057         Add an Image
00058     """
00059 
00060     # cookId sets the id and title if they are not explicity specified
00061     id, title = OFS.Image.cookId(id, title, file)
00062 
00063     self=self.this()
00064 
00065     # Instantiate the object and set its description.
00066     iobj = Image( id, title, '', content_type, precondition, subject
00067                 , description, contributors, effective_date, expiration_date
00068                 , format, language, rights
00069                 )
00070 
00071     # Add the Image instance to self
00072     self._setObject(id, iobj)
00073 
00074     # 'Upload' the image.  This is done now rather than in the
00075     # constructor because it's faster (see File.py.)
00076     self._getOb(id).manage_upload(file)
00077 


Variable Documentation

Definition at line 225 of file Image.py.