#NEWLINE# def chunks( self , chunk_size = None ) : #NEWLINE# #INDENT# '\n        Read the file and yield chucks of ``chunk_size`` bytes (defaults to\n        ``UploadedFile.DEFAULT_CHUNK_SIZE``).\n        ' #NEWLINE# if ( not chunk_size ) : #NEWLINE# #INDENT# chunk_size = self . DEFAULT_CHUNK_SIZE #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . seek ( 0 ) #NEWLINE# #UNINDENT# except ( AttributeError , UnsupportedOperation ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# while True : #NEWLINE# #INDENT# data = self . read ( chunk_size ) #NEWLINE# if ( not data ) : #NEWLINE# #INDENT# break #NEWLINE# #UNINDENT# ( yield data )