def process_temporary_file(self, tmp_file):
<EOL>if len(tmp_file.filename) > <NUM_LIT:100>:<EOL><INDENT>base_filename = tmp_file.filename[:tmp_file.filename.rfind("<STR_LIT:.>")]<EOL>tmp_file.filename = "<STR_LIT>" % (base_filename[:<NUM_LIT>-len(tmp_file.extension)], tmp_file.extension)<EOL><DEDENT>tmp_file.save()<EOL>data = {<EOL>'<STR_LIT>': str(tmp_file.uuid)<EOL>}<EOL>response = HttpResponse(json.dumps(data), status=<NUM_LIT>)<EOL>response['<STR_LIT>'] = "<STR_LIT>"<EOL>return response<EOL>
Truncates the filename if necessary, saves the model, and returns a response