the-library-code / dspace-rest-python

DSpace REST API Client Library
BSD 3-Clause "New" or "Revised" License
25 stars 23 forks source link

`mime` missing from `bitstream` model #18

Open alanorth opened 5 months ago

alanorth commented 5 months ago

Currently the bitstream's mimetype is missing from the bitstream model. The client already passes the mimetype in create_bitstream(). If this was available in the model it could be used instead of checking whether the filename string contains ".pdf", for example.

kshepherd commented 5 months ago

Ah yes, there is a HAL link from the bitstream entity for this: https://github.com/DSpace/RestContract/blob/main/bitstreams.md#format

The easiest way to handle this is to embed format in the response like .../bitstreams?embed=format -- and is part of a larger improvement needed, where we expect all sorts of object types in _embedded