fix(upload): publish uploaded thumbnail URL (was published empty)

Selecting a thumbnail FILE clears+disables the thumbnail text input, but the
publish metadata read only that (now-empty) input — so file-uploaded thumbnails
published as "thumbnail":"" and the image was missing. Prefer the uploaded
thumbnail's URL (thumbnailUploadState.url), falling back to a pasted URL.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
thePR0M3TH3ANandClaude Opus 4.8 committed 2026-06-20 08:27:41 -04:00
1 parent 95071fd16b
commit f218ec32fa
1 file changed
+8 -1
+8 -1
View File
@@ -1042,7 +1042,14 @@ export class UploadModal {
const metadata = {
title: this.inputs.title?.value?.trim() || "",
description: this.inputs.description?.value?.trim() || "",
thumbnail: this.inputs.thumbnail?.value?.trim() || "",
// Prefer an uploaded thumbnail's URL: selecting a thumbnail file
// clears+disables the text input (see the file-picker handler), so
// inputs.thumbnail.value is empty for file uploads. Fall back to a
// pasted URL when no file was uploaded.
thumbnail:
this.thumbnailUploadState?.url ||
this.inputs.thumbnail?.value?.trim() ||
"",
enableComments: this.toggles.comments?.checked || true,
...audienceFlags,