I store a media object in a table.
During “storage” phase, I can read the size of the media object.
Oddily, when I read the media object back, the .length property returns None.
Here’s a small app showing the issue.
Just upload a file and refresh.
Sizes computed at save-time are there, sizes computed at read-time are None
As another workaround, save the length as the value of an adjacent database table column, in the same row, when the media object is saved. Once you do that, then you don’t have to actually retrieve the media object contents (which may be an extra round trip to the database) just to get the length.