How can I share an image as document for WhatsApp from my app?

18 hours ago 6
ARTICLE AD BOX

I have tried setting MIME to 'octet-stream', but WhatsApp still treats it as an image. It probably uses FilProvider's response, which uses the file extension to decide. I can change the extension but then it'll become ugly as on clicking I still want it to open as an image. Can anyone guide whats correct way to do it?

asked 5 hours ago

Ayush Gupta's user avatar

1

What in your mind is the difference between a document and an image and how do you expect them to be handled differently by the other app? Because "document" is just a generic name for a data file, it isn't a particular thing.

2026-03-20 06:29:46 +00:00

Commented 1 hour ago

Read Entire Article