def post(self, request, *args, **kwargs):
try:<EOL><INDENT>files = request.session['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>files = {}<EOL><DEDENT>action = request.POST.get('<STR_LIT:action>', '<STR_LIT>')<EOL>if action == '<STR_LIT>':<EOL><INDENT>file_name = request.POST.get('<STR_LIT>', '<STR_LIT>')<EOL>n_files = {}<EOL>for key, file in files.items():<EOL><INDENT>if key != file_name:<EOL><INDENT>n_files[key] = file<EOL><DEDENT><DEDENT>files = n_files<EOL><DEDENT>else:<EOL><INDENT>for key, file in request.FILES.items():<EOL><INDENT>file_name = file.name<EOL>idx = <NUM_LIT:1><EOL>while file_name in files.keys():<EOL><INDENT>file_name = '<STR_LIT>' % (idx, file_name)<EOL>idx += <NUM_LIT:1><EOL><DEDENT>files[file_name] = dict(<EOL>content=force_text(base64.b64encode(file.read())),<EOL>content_type=file.content_type,<EOL>size=file.size,<EOL>)<EOL><DEDENT><DEDENT>request.session['<STR_LIT>'] = files<EOL>return HttpResponseRedirect('<STR_LIT:.>')<EOL>
This method is only for testing and can
            be used to add some files to the session.

            actions:

                - add_file: Add another file
                - remove_file: Add another file