예제 #1
0
 def get_content_type(self):
     if not os.path.isfile(self.file_path):
         return "text/html"
     #        (mimetype, _mimeencoding) = mimetypes.guess_type(self.file_path)
     #        if not mimetype:
     #            mimetype = "application/octet-stream"
     #        return mimetype
     return util.guess_mime_type(self.file_path)
예제 #2
0
 def get_content_type(self):
     if not os.path.isfile(self.file_path):
         return "text/html"
     #        (mimetype, _mimeencoding) = mimetypes.guess_type(self.file_path)
     #        if not mimetype:
     #            mimetype = "application/octet-stream"
     #        return mimetype
     return util.guess_mime_type(self.file_path)
예제 #3
0
    def get_content_type(self):
        if self.is_collection:
            return None
#        (mimetype, _mimeencoding) = mimetypes.guess_type(self.path)
#        if not mimetype:
#            return "application/octet-stream"
#        return mimetype
        return util.guess_mime_type(self.path)
예제 #4
0
 def get_content_type(self):
     #        (mimetype, _mimeencoding) = mimetypes.guess_type(self.path)
     #        print "mimetype(%s): %r, %r" % (self.path, mimetype, _mimeencoding)
     #        if not mimetype:
     #            mimetype = "application/octet-stream"
     #        print "mimetype(%s): return %r" % (self.path, mimetype)
     #        return mimetype
     return util.guess_mime_type(self.path)
예제 #5
0
 def get_content_type(self):
     if self.is_collection:
         return None
     #        (mimetype, _mimeencoding) = mimetypes.guess_type(self.path)
     #        if not mimetype:
     #            return "application/octet-stream"
     #        return mimetype
     return util.guess_mime_type(self.path)
예제 #6
0
 def get_content_type(self):
     return util.guess_mime_type(self.path)
예제 #7
0
 def get_content_type(self):
     return self.listing_item.get('ContentType',
                                  util.guess_mime_type(self.davPath))
예제 #8
0
 def get_content_type(self):
     if os.path.isfile(self._file_path):
         return util.guess_mime_type(self._file_path)
     else:
         return None
예제 #9
0
 def get_content_type(self):
     return util.guess_mime_type(self.path)