class ContentFile(File) [source]
The ContentFile class inherits from File, but unlike File it operates on string content (bytes also supported), rather than an actual file. For example:
from __future__ import unicode_literals
from django.core.files.base import ContentFile
f1 = ContentFile("esta sentencia está en español")
f2 = ContentFile(b"these are bytes")
Please login to continue.