Skip to content

[Backend] Complete thumbnailUrl population in UploadService (currently always undefined) #670

Description

@llinsss

Location: backend/src/modules/upload/upload.service.ts (around lines 440-441)

Problem:
thumbnailUrl: thumbnail ? undefined : undefined always evaluates to undefined regardless of whether a thumbnail variant exists. The adjacent comment (// Will be populated by CDN in next milestone) suggests this is a known placeholder, but the ternary itself is dead/misleading code that should at minimum be simplified, and ideally actually wired up.

Why it matters:
Any client relying on thumbnailUrl from this response currently always gets undefined, even when a thumbnail variant was generated.

Suggested fix:

  • If the CDN wiring described in the comment is ready to implement, populate thumbnailUrl from the thumbnail variant's CDN URL.
  • If not yet ready, at least simplify to thumbnailUrl: undefined with a clearer TODO, so the dead ternary doesn't look like working logic.

Acceptance criteria:

  • thumbnailUrl reflects the actual thumbnail CDN URL when a thumbnail variant exists.
  • Test covers a file with and without a thumbnail variant.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions