#NEWLINE# def save( self , name , content , save = True ) : #NEWLINE# #INDENT# super ( ImageWithThumbsFieldFile , self ) . save ( name , content , save ) #NEWLINE# if self . sizes : #NEWLINE# #INDENT# for size in self . sizes : #NEWLINE# #INDENT# ( w , h ) = size #NEWLINE# split = self . name . rsplit ( '.' , 1 ) #NEWLINE# thumb_name = ( '%s.%sx%s.%s' % ( split [ 0 ] , w , h , split [ 1 ] ) ) #NEWLINE# thumb_content = generate_thumb ( self . file , size , split [ 1 ] ) #NEWLINE# thumb_name_ = self . storage . save ( thumb_name , thumb_content ) #NEWLINE# if ( not ( thumb_name == thumb_name_ ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'There is already a file named %s' % thumb_name ) )