def file_upload_echo(request):
 r = {k: f.name for (k, f) in request.FILES.items()}
 return HttpResponse(json.dumps(r))

def file_upload_echo ( request ) : r = { k : f . name for ( k , f ) in request . FILES . items ( ) } return HttpResponse ( json . dumps ( r ) )
simple view to echo back info about uploaded files for tests .