Upload a file to a temporary location using multipart/form-data. Returns an uploadID that can be referenced when sending messages with attachments.
Upload an asset
import os
from beeper_desktop_api import BeeperDesktop
client = BeeperDesktop(
access_token=os.environ.get("BEEPER_ACCESS_TOKEN"), # This is the default and can be omitted
)
response = client.assets.upload(
file=b"Example data",
)
print(response.width){
"duration": 0,
"error": "error",
"fileName": "fileName",
"fileSize": 0,
"height": 0,
"mimeType": "mimeType",
"srcURL": "srcURL",
"uploadID": "uploadID",
"width": 0
}Returns Examples
{
"duration": 0,
"error": "error",
"fileName": "fileName",
"fileSize": 0,
"height": 0,
"mimeType": "mimeType",
"srcURL": "srcURL",
"uploadID": "uploadID",
"width": 0
}