Skip to Content

File

class

File

Constructor

constructor
File(buffer: Buffer, name: string, options: any): File
Constructs a File from the given buffer

Parameters:

buffer: Buffer
The buffer
name: string
The file name
options: any
Provide `options.type` to set the mime type of the file's content (such as image/jpeg) and `options.lastModified` to set the last modified date (defaults to the current date)

Returns:

File

Properties

buffer
The buffer
Buffer
name
The file name
string

Methods

toString
toString(): string
Returns a string representation of an object.

Returns:

string

Accessors

[toStringTag]

Start building

XO

Request Demo

Schedule a call with our team

Select a product
Arrow right

Start building
Grateful

Contact Us

We're here to help