Upload a file to a temporary location using multipart/form-data. Returns an uploadID that can be referenced when sending messages with attachments.
Parameters
file_name: Optional[str]
Original filename. Defaults to the uploaded file name if omitted
mime_type: Optional[str]
MIME type. Auto-detected from magic bytes if omitted
Returns
Upload an asset
from beeper_desktop_api import BeeperDesktop
client = BeeperDesktop()
response = client.assets.upload(
file=b"raw file contents",
)
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
}