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.
Location:
backend/src/modules/upload/upload.service.ts(around lines 440-441)Problem:
thumbnailUrl: thumbnail ? undefined : undefinedalways evaluates toundefinedregardless 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
thumbnailUrlfrom this response currently always getsundefined, even when a thumbnail variant was generated.Suggested fix:
thumbnailUrlfrom the thumbnail variant's CDN URL.thumbnailUrl: undefinedwith a clearer TODO, so the dead ternary doesn't look like working logic.Acceptance criteria:
thumbnailUrlreflects the actual thumbnail CDN URL when a thumbnail variant exists.