Skip to main content

Module media

Module media 

Source
Expand description

Bounded native CDN transport. This uses the observed HTTP carrier on port 443, not HTTPS. Media encryption and advertised size/digests are checked separately.

Structs§

CdnClient
CdnConfig
CdnLocation
DownloadedMedia
ImageInspection
MediaDescriptor
PreparedImageUpload
PreparedUpload
PreparedVariant
PreparedVideoUpload
StickerDescriptor
UploadedImage
UploadedMedia
UploadedVideo

Enums§

LargeCdnRoute
LargeFileDownloadControl
Only these fixed, nonsecret numeric controls can enter a stored diagnostic.
LargeFileDownloadError
Strict rejection details. Unknown keys and response bytes are never retained.
MediaQuality

Constants§

MAX_CDN_TRANSFER_BYTES
MAX_LARGE_FILE_BYTES
MAX_LINK_THUMBNAIL_BYTES
MAX_NATIVE_UPLOAD_BYTES
STICKER_HOSTS
Sticker bytes come from Tencent CDN hosts. Classic stored and pack emoji carry a wxapp.tc.qq.com source, while shared stickers use snsvideo.c2c.wechat.com; both are reachable directly, unlike the encrypted attachment channels. Any other host stays refused so a crafted message cannot turn this into an arbitrary fetch.

Functions§

adler32_zero
decode_cdn_config
decode_large_cdn_config
Decode the safe C2C routing table in an authenticated GetCDNDns response. The safe CDN UIN belongs to that routing table and may differ from the account UIN.
decrypt_cdn
download_advertised_avatar
encrypt_recipient
fetch_link_thumbnail
fetch_sticker
inspect_image
Inspect the retained source. For WXGF, dimensions describe its still preview; frames does not establish the source’s animation frame count.
pack_cdn
unpack_cdn
validate_avatar_url
validate_link_thumbnail_url
validate_shared_link_url
validate_sticker_url

Type Aliases§

CdnFields