def upload_progress(request):
if '<STR_LIT>' in request.GET:<EOL><INDENT>progress_id = request.GET['<STR_LIT>']<EOL><DEDENT>elif '<STR_LIT>' in request.META:<EOL><INDENT>progress_id = request.META['<STR_LIT>']<EOL><DEDENT>if '<STR_LIT>' in request.GET:<EOL><INDENT>logfilename = request.GET['<STR_LIT>']<EOL><DEDENT>elif '<STR_LIT>' in request.META:<EOL><INDENT>logfilename = request.META['<STR_LIT>']<EOL><DEDENT>cache_key = "<STR_LIT>" % (request.META['<STR_LIT>'], progress_id)<EOL>data = cache.get(cache_key)<EOL>if not data:<EOL><INDENT>data = cache.get(logfilename.replace('<STR_LIT:U+0020>','<STR_LIT:_>'))<EOL><DEDENT>return HttpResponse(json.dumps(data))<EOL>
AJAX view adapted from django-progressbarupload

Return the upload progress and total length values