feat(document): getThumbnailUrl composes /api/documents/{id}/thumbnail when key present

The no-cache-buster branch covers documents whose thumbnail key is set
but whose thumbnailGeneratedAt is still null — which only happens in
the narrow window between the key being persisted and the async worker
stamping the timestamp (#309).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-23 21:52:09 +02:00
parent 096f66eb15
commit df260d5c64
2 changed files with 18 additions and 1 deletions

View File

@@ -133,6 +133,7 @@ public class Document {
private Set<TrainingLabel> trainingLabels = new HashSet<>();
public String getThumbnailUrl() {
return null;
if (thumbnailKey == null) return null;
return "/api/documents/" + id + "/thumbnail";
}
}