mode The read/write mode for the file.
class ImageFile(file_object) [source] Django provides a built-in class specifically for images
chunks(chunk_size=None) [source] Iterate over the file yielding “chunks” of a given size
name The name of the file including the relative path from MEDIA_ROOT.
open(mode=None) [source] Open or reopen the file (which also does File.seek(0))
read(num_bytes=None) Read content from the file. The optional size is the number of bytes to read; if not specified
class File(file_object) [source] The File class is a thin wrapper around a Python
__iter__() [source] Iterate over the file yielding one line at a time.
Page 2 of 2