## Upload Base64 `client.Assets.UploadBase64(ctx, body) (*AssetUploadBase64Response, error)` **post** `/v1/assets/upload/base64` Upload a file using a JSON body with base64-encoded content. Returns an uploadID that can be referenced when sending messages with attachments. Alternative to the multipart upload endpoint. ### Parameters - `body AssetUploadBase64Params` - `Content param.Field[string]` Base64-encoded file content (max ~500MB decoded) - `FileName param.Field[string]` Original filename. Generated if omitted - `MimeType param.Field[string]` MIME type. Auto-detected from magic bytes if omitted ### Returns - `type AssetUploadBase64Response struct{…}` - `Duration float64` Duration in seconds (audio/videos) - `Error string` Error message if upload failed - `FileName string` Resolved filename - `FileSize float64` File size in bytes - `Height float64` Height in pixels (images/videos) - `MimeType string` Detected or provided MIME type - `SrcURL string` Local file URL (file://) for the uploaded asset - `UploadID string` Unique upload ID for this asset - `Width float64` Width in pixels (images/videos) ### Example ```go package main import ( "context" "fmt" "github.com/beeper/desktop-api-go" ) func main() { client := beeperdesktopapi.NewClient( ) response, err := client.Assets.UploadBase64(context.TODO(), beeperdesktopapi.AssetUploadBase64Params{ Content: "x", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.Width) } ```