def clean_value(self, val):
if isinstance(val, dict):<EOL><INDENT>if self.random_name:<EOL><INDENT>val['<STR_LIT>'] = self.random_name<EOL><DEDENT>if '<STR_LIT>' in val.keys():<EOL><INDENT>val['<STR_LIT:name>'] = val.pop('<STR_LIT>')<EOL>val['<STR_LIT:content>'] = val.pop('<STR_LIT>')<EOL><DEDENT>return self.file_manager().store_file(**val)<EOL><DEDENT>try:<EOL><INDENT>return str(val)<EOL><DEDENT>except ValueError:<EOL><INDENT>raise ValidationError("<STR_LIT>" % val)<EOL><DEDENT>
val =
:param dict val: {"content":"", "name":"", "ext":"", "type":""}
:return: