Collaborative edit of pictures & sequences metadata
Summary
This issue is about starting a technical implementation of metadata editing through API, for both picture author and everyone logged in with an account.
Functional choices (can be discussed)
- Anyone logged in could edit those fields, either picture by picture or for the whole sequence:
- Picture heading
- Picture coordinates
- Picture type (360° or not)
- Picture field of view
- Picture EXIF field
- All changes are stored (change ID, date, author, past version of edited fields) to allow easy reverting
- Changes are made available with no delay in STAC API responses : direct visibility for API users (website)
- Changes are stored in picture files asynchronously (delay depending of server load, from seconds to hours) : available a few moments later if you download a picture and only use its EXIF tags. Updated metadata is still available instantly in API response.
Technical implementation
Discussed with @antoine-de this morning. Two new tables are needed to keep track of changes in DB:
-
Pictures changes, with these fields:
- Change UUID
- Concerned picture UUID
- Change timestamp
- Account UUID
- JSON with columns corresponding to edited fields, with old value (the one in DB before edit)
- Optional foreign key to a sequence change, if this edit was made related to a all pictures in sequence change
-
Sequences changes, with these fields:
- Change UUID
- Concerned sequence UUID
- Change timestamp
- Account UUID
- JSON with columns corresponding to edited fields, with old value (the one in DB before edit)
This allows to keep track of all changes, concerned features and users... For an easy revert.
Implementation can be done first to keep track of changes made in current API (by author itself), and progressively open for edits made collaboratively.
Some technical questions are still there:
- API routes: should we use the same ones for third-party edits and for author edit ?