Bring-your-own-storage (PlanetHosted) images show "image not found": GetSignedUrl asks the node for <path>/signed

Open Beginner friendly
#1,719 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
backend

Research direction

Read Sdk/Models/MessageAttachment.cs and trace GetSignedUrl for PlanetHosted attachments. Compare its behavior with the validation in MessageService.PrepareAttachmentsAsync and ValidatePlanetHostedAttachment. Done when planet-hosted image locations are used successfully by clients and the relevant attachment tests pass; the issue does not name a test file.

Written by the indexing model from the issue text.

Description

Needs Looking At

What happens: With planet storage (BYO S3) enabled, uploads succeed and the message saves with a
PlanetHosted attachment at the public base URL, but every client shows "image not found".

Cause: Sdk/Models/MessageAttachment.cs GetSignedUrl handles Tenor/Klipy and proxy/ paths, and
otherwise strips the host and asks the message's node for <path>/signed. A planet-hosted attachment lives
on the planet's own public base URL (e.g. https://media.example.org/valour-media/...), so the node gets
GET /valour-media/.../signed, has no such route, returns 404, and the client renders "image not found".

Suggested fix: in GetSignedUrl, return Location as-is when PlanetHosted is true (the server already
validates that planet-hosted locations sit under the planet's registered public base URL in
MessageService.PrepareAttachmentsAsync / ValidatePlanetHostedAttachment).

Workaround we use: a reverse proxy in front of the node answers GET /valour-media/(.+)/signed with
https://<public base>/$1.

Environment: self-hosted community node (Docker, main-latest, reports v0.9.17), federated under the official hub; planet migrated from the hub.

Dominant language
C#
Stars
411
Forks
41
Avg merge
5d 4h
Merged PRs (30d)
13

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • No pull request template
  • No 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.

More from Valour-Software/Valour

All issues in Valour-Software/Valour

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.