if not datachunk:
    break
raw = raw + datachunk
filename = data.filename
return 'Hello %s! You uploaded %s (%d bytes).' % (name, filename, len(raw))
How to check size of uploaded file safely in bottlepy?