whatsapp-web.js
whatsapp-web.js copied to clipboard
Download document thumbnail
Is there an existing issue for this?
- [X] I have searched the existing issues
Is your feature request related to a problem? Please describe.
If the message type is a document, it has an associated image (thumbnail). The information is in the thumbnailDirectPath, thumbnailSha256, thumbnailEncSha256 properties. I did not find a method to get that file.
Describe the solution you'd like.
A good feature would be to have a function like downloadMedia() that allows you to download it.
Describe an alternate solution.
No response
Additional context
No response
I think the thumbnail is provided in the message raw data. Try using that, there is no plans to implement thumbnail downloads right now :D
Thanks for your comment @PurpShell !
Thumbnail references are in msgdata, but by now I cannot understand how to use. Asap I discovered I will post here my aproach. Thanks again for your time!
thumbnailDirectPath: '/v/t62.36145-24/31077419_877580720045625_3890474881285585356_n.enc?ccb=11-4&oh=01_AdSag5ZwgY2Vti0V3wcnvQxdYORLnGCcqoLXB1XYq14Ggg&oe=63D52BBD', thumbnailSha256: '9hBfj2Ayatjbv7+7/oWd3m75RMxwD4wQ4lQ2QvQvicc=', thumbnailEncSha256: 'VXJdGnyynNf72ucTOLVYMZkH06E1VaTzrk9iiXA1exA=', thumbnailHeight: 480, thumbnailWidth: 271,