def get_field_size(field):
    try:
        field.seek(0, 2)  # Seek to the end of the file
        size = field.tell()  # Get the position of EOF
        field.seek(0)  # Reset the file position to the beginning
        return size
    except:
        return 0
:param field: Instance of `cgi.FieldStorage`.
dataset/ETHPy150Open gregorynicholas/flask-gae_blobstore/flask_gae_blobstore.py/get_field_size