On iPhone, open the chat, tap the contact or group name and choose “Export Chat”. On Android, open the chat, tap the three dots, then “More” and “Export chat”.
Choose “Include media” (on iPhone, “Attach media”) to bring photos, audio, video and documents, or “Without media” for the text only. WhatsApp creates a ZIP file, and that is the file you upload: from iPhone or Android, one-to-one or group, up to 5 GB per file. If the ZIP with media is bigger than that, export the chat without media: the text always fits. Mind WhatsApp's own limit: an export with media carries only the 10,000 most recent messages, and without media, up to 40,000; in a long chat, older photos and audio are left out of the ZIP, and no upload recovers what WhatsApp did not export.