(upload_file,size,file_type)
return result
upload_file: request.Files['upload_file']
        size: file size int
        file_type: ['png','jpg'] list
upload_file: request.Files['upload_file']
        size: file size int
        file_type: ['png','jpg'] list
upload_file : request . Files [ upload_file ] size : file size int file_type : [ png jpg ] list
def validate_upload_file(upload_file,size,file_type):
        '''
        upload_file: request.Files['upload_file']
        size: file size int
        file_type: ['png','jpg'] list
        '''
        result=False
        file_content_type=BusinessService.get_file_suffixes(upload_file.name)
        if upload_file.size<=size:
            result=True
        if file_type!=None:
            if result and  file_content_type in file_type:
                result=True
            else:
                result=False
        return result
def validate_upload_file ( upload_file , size , file_type ) : result = False file_content_type = BusinessService . get_file_suffixes ( upload_file . name ) if upload_file . size <= size : result = True if file_type != None : if result and file_content_type in file_type : result = True else : result = False return result