Closed
Description
Related: #675
Easy: if (file instanceof File) return file.name
in guessFilename()
.
Bonus: change
export class InputFile {
public readonly filename?: string;
async toRaw(): Promise<
Uint8Array | Iterable<Uint8Array> | AsyncIterable<Uint8Array>
>
}
to
export class InputFile {
readonly name?: string;
async stream(): AsyncIterable<Uint8Array>;
}
This would:
- align with web standards,
- simplify file handling in
Client
, - increase flexibility:
new InputFile(inputFile, "new name")
, - give us the option to add a
[Symbol.hasInstance]()
acceptingBunFile
, andInputFile
from other grammY versions.
Metadata
Metadata
Assignees
Labels
No labels