def url_filename(url):
 match = upload_title_re.match(url)
 if match:
  return match.group('filename')
 else:
  return url

def url_filename ( url ) : match = upload_title_re . match ( url ) if match : return match . group ( 'filename' ) else : return url
extract the filename if a url is an uploaded file .