digidem / digidem/comapeo-core
Return attachment URLs with observation records
Open
@RangerMauve is already working on this.
Since Feb 5, 2026.
- Dominant language
- JavaScript
- Stars
- 24
- Forks
- 6
- Avg merge
- 1d 40m
- Merged PRs (30d)
- 8
Description
Description
Currently the client needs to make multiple calls to view observation attachments:
- Get the observation
- Get the URL for each attachment
- Request the URL.
We could simplify things by removing step (2) and returning the observation with URLs included, something like:
interface Observation {
attachments: Array<{
name: string,
...
urls: {
original: string,
preview?: string,
thumbnail?: string,
}>
}
@ErikSin @achou11 would this simplify the front-end implementation? I'm thinking of writing something generic for expanding references in data types, so that we can expand icon URLs and preset field references too. Could even make the getUrl methods internal if we end up not needing them.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.