Ejemplo n.º 1
0
 def image_iterator(self, connection, headers, body):
     if self._sendable(body):
         return SendFileIterator(connection, body)
     elif self._iterable(body):
         return utils.chunkreadable(body)
     else:
         return ImageBodyIterator(body)
Ejemplo n.º 2
0
 def image_iterator(self, connection, headers, body):
     if self._sendable(body):
         return SendFileIterator(connection, body)
     elif self._iterable(body):
         return utils.chunkreadable(body)
     else:
         return ImageBodyIterator(body)