in darabonba/utils/form.py [0:0]
def _length(o):
if hasattr(o, 'len'):
return o.len
elif isinstance(o, BytesIO):
return o.getbuffer().nbytes
elif hasattr(o, 'fileno'):
return os.path.getsize(o.name)
return len(o)