MCPcopy Index your code
hub / github.com/MongoEngine/mongoengine / _put_thumbnail

Method _put_thumbnail

mongoengine/fields.py:1992–1999  ·  view source on GitHub ↗
(self, thumbnail, format, progressive, **kwargs)

Source from the content-addressed store, hash-verified

1990 return super().delete()
1991
1992 def _put_thumbnail(self, thumbnail, format, progressive, **kwargs):
1993 w, h = thumbnail.size
1994
1995 io = BytesIO()
1996 thumbnail.save(io, format, progressive=progressive)
1997 io.seek(0)
1998
1999 return self.fs.put(io, width=w, height=h, format=format, **kwargs)
2000
2001 @property
2002 def size(self):

Callers 1

putMethod · 0.95

Calls 2

saveMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected