docs/MessageMedia.html
| Name | Type | Optional | Description |
|---|---|---|---|
mimetype
|
|
|
MIME type of the attachment
| |
data
|
|
|
Base64-encoded data of the file
| |
filename
|
|
|
Document file name. Value can be null
Value can be null.
| |
filesize
|
|
|
Document file size in bytes. Value can be null
Value can be null.
|
Base64 encoded data that represents the file
Document file name. Value can be null
Document file size in bytes. Value can be null
MIME type of the attachment
static
Creates a MessageMedia instance from a local file path
| Name | Type | Optional | Description |
|---|---|---|---|
filePath
|
string
|
| |
Returns
MessageMedia
async static
Creates a MessageMedia instance from a URL
| Name | Type | Optional | Description |
|---|---|---|---|
url
|
string
|
| | |
options
|
Object
|
Yes
|
Values in options have the following properties:
| Name | Type | Optional | Description |
|---|---|---|---|
unsafeMime
|
boolean
|
Yes
|
Defaults to false.
| |
filename
|
string
|
Yes
| | |
client
|
object
|
Yes
| | |
reqOptions
|
object
|
Yes
| | |
reqOptions.size
|
number
|
Yes
|
Defaults to 0.
|
|
Returns
Promise containing MessageMedia