Logo Search packages:      
Sourcecode: zope-extfile version File versions

def zope-extfile-1.4.2::ExtFile::ExtFile::_get_content_type (   self,
  file,
  body,
  id,
  content_type = None 
) [private]

Determine the mime-type 

Definition at line 509 of file ExtFile.py.

00509                                                                   :
        """ Determine the mime-type """
        headers = getattr(file, 'headers', None)
        if headers and headers.has_key('content-type'):
            content_type = headers['content-type']
        else:
            if type(body) is not type(''): body = body.data
            content_type, enc = guess_content_type(getattr(file,'filename',id),
                                                   body, content_type)
        return content_type
    
    def _update_data(self, infile, outfile):


Generated by  Doxygen 1.6.0   Back to index