#NEWLINE# def save_image_field( self , field , resize_to = None , replace = False , filename = None , convert = True , subpath = '' ) : #NEWLINE# #INDENT# from uliweb.utils.image import resize_image #NEWLINE# if resize_to : #NEWLINE# #INDENT# field . data . file = resize_image ( field . data . file , resize_to ) #NEWLINE# #UNINDENT# filename = ( filename or field . data . filename ) #NEWLINE# fname = self . save_file ( filename , field . data . file , replace , convert , subpath = filename ) #NEWLINE# field . data . filename = fname #NEWLINE# return fname