digidem / digidem/comapeo-core

Return attachment URLs with observation records

Open
#409 2 comments 1 reaction 1 assignee View on GitHub

@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:

  1. Get the observation
  2. Get the URL for each attachment
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.