denshoproject / encyc-front

front-end interface for the encyclopedia
Other
1 stars 0 forks source link

Filesize information always reported as "(0 bytes)" on Source detail pages #92

Closed GeoffFroh closed 3 years ago

GeoffFroh commented 4 years ago

The filesize info that appears in the download link for the images on the Source detail pages is always "(0 bytes)".

See, for example:

https://encycstage.densho.org/sources/en-denshopd-p159-00002-1/

Could be a data problem, but not very important anyways. Should just be removed from template altogether.

gjost commented 4 years ago

Looks like the original_size field in Elasticsearch is blank. Fix in encyc-core.

gjost commented 4 years ago

The current PSMS API does not surface the original_size field: https://psms.densho.org/api/2.0/sources/

gjost commented 4 years ago

Mitigation in encyc-front commit f5146b2 for package encycfront-master_4.1.2~deb10. If Source.original_size is blank then file size is just not printed at all. The real fix will come when encyc-psms is updated to include original_size in the API.