Closed mmaeffert closed 7 months ago
Save the media using FS temporarily and get the filesize
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is there an existing issue for this?
Describe the bug
When accessing the .filesize attribute of the MessageMedia object I get returned from the method downloadMedia(), it is undefined, despite the .data attribute being defined.
Expected behavior
Getting the resulting filesize of the MessageMedia object
Steps to Reproduce the Bug or Issue
` try { message.downloadMedia().then((sticker) => {
Relevant Code
No response
Browser Type
Chromium
WhatsApp Account Type
Standard
Does your WhatsApp account have multidevice enabled?
No, I am not using Multi Device
Environment
Additional context
Happens when downloading stickers.
My Workaround:
unescape(atob(sticker.data)).length