Skip to content

Commit 0ba92d0

Browse files
committed
fix: Check altText if available instead of filename
1 parent 868591e commit 0ba92d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/api/upload/upload.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ export class Upload extends EventEmitter {
233233
const f = await getFile(input, this.sanitizerOptions, this.mimetype);
234234
f.customName = this.overrideFileName;
235235

236-
if (this.overrideFileName) {
236+
if (this.altText) {
237237
f.alt = this.altText
238238
}
239239

@@ -269,7 +269,7 @@ export class Upload extends EventEmitter {
269269
const f = await getFile(input[i], this.sanitizerOptions, this.mimetype);
270270
f.customName = this.overrideFileName;
271271

272-
if (this.overrideFileName) {
272+
if (this.altText) {
273273
f.alt = this.altText
274274
}
275275

0 commit comments

Comments
 (0)