Open Castronova opened 2 years ago
@Castronova This shows currently what size units are allowed for contentSize
.
https://github.com/I-GUIDE/catalogapi/blob/develop/api/models/schema.py#L425
Here is a unit test where we have used different size units: https://github.com/I-GUIDE/catalogapi/blob/develop/tests/test_core_schema.py#L336
According to SchemaOrg
contentSize
is:This will be strange for small or very large files:
Moreover, if we round to the nearest integer the becomes even worse:
256 B = 0 KB or 1KB
One solution is to recommend that all
contentSize
values simply contain units, e.g. Bytes (B), Kilobytes (KB), Megabytes (MB), Gigabytes (GB), Terabytes (TB).