Ejemplo n.º 1
0
def create_thumbnail(filename, content, mimetype=None, export="binary"):
    return thumbnail.create_thumbnail(binary=content,
                                      filename=filename,
                                      mimetype=mimetype,
                                      export=export)
Ejemplo n.º 2
0
 def test_thumbnail_video(self):
     with open(os.path.join(_path, 'tests/data', 'sample.mp4'),
               'rb') as file:
         self.assertTrue(
             thumbnail.create_thumbnail(binary=file.read(),
                                        filename='sample.mp4'))