Skip to content

Sending a large thumbnail URL in channel messages #498

Discussion options

You must be logged in to vote

theres other func for upload media to channel

whatsmeow/upload.go

Lines 124 to 130 in 9eb4197

func (cli *Client) UploadNewsletter(ctx context.Context, data []byte, appInfo MediaType) (resp UploadResponse, err error) {
resp.FileLength = uint64(len(data))
hash := sha256.Sum256(data)
resp.FileSHA256 = hash[:]
err = cli.rawUpload(ctx, data, resp.FileSHA256, appInfo, true, &resp)
return
}

Replies: 4 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@arugaz
Comment options

Comment options

You must be logged in to vote
3 replies
@arugaz
Comment options

@arugaz
Comment options

@rudyzeinoun
Comment options

Comment options

You must be logged in to vote
1 reply
@rudyzeinoun
Comment options

Answer selected by rudyzeinoun
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants