mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-31 09:52:24 +00:00
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:
1 parent
95071fd16b
commit
f218ec32fa
1 file changed
+8
-1
@@ -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,
|
||||
|
||||
|
||||
Reference in new issue
Block a user