opencdms-dev / legacy-opencdms-api

⭐🐍 OpenCDMS server application written in Python (FastAPI) and exposing a web interface for `opencdms-app` and other applications
MIT License
3 stars 3 forks source link

Read / write images through Climsoft API #36

Open isedwards opened 2 years ago

isedwards commented 2 years ago

Climsoft has support for reading and writing image data. Currently images are not stored in the database however, when we implement this, it would be good to have a single interface where we can configure the server to either:

a) read / write files from a path on a local disc, or b) store images directly in the database (if the database has good support for this) c) use a cloud service like Amazon's S3

The paperarchive and paperarchivedefinition database tables store metadata related to the available images. This can be see on the "Archival List" tab of the Paper Archiving module in Climsoft

paperarchive

User interface Database table Database field Type Details
StationId paperarchive classifiedInto (or station?) ForeignKey('station.stationId')
FormId paperarchive belongsTo ForeignKey('paperarchivedefinition.formId')
Form datetime paperarchive formDatetime DateTime Date written on the paper form
Image paperarchive image String(255) Path to file