Skip to content

Commit 4ad5ddb

Browse files
committed
default title to filename if not provided
1 parent 0bb6d13 commit 4ad5ddb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/web-api/src/file-upload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function getFileUpload(
2828
initial_comment: options.initial_comment,
2929
snippet_type: options.snippet_type,
3030
thread_ts: options.thread_ts,
31-
title: options.title,
31+
title: options.title ?? (options.filename ?? fileName),
3232
// calculated
3333
data: fileData,
3434
length: fileDataBytesLength,

0 commit comments

Comments
 (0)