Drop in the file LinkedIn emailed you. It is read on your own machine, and the file itself is never stored.
Where do I get this file? LinkedIn → Settings → Data Privacy → Get a copy of your data → tick Messages. They email it to you within a few hours.
Upload the ZIP exactly as it arrives — don't unzip it first. The ZIP is around six times smaller than the messages.csv inside it, so it uploads in a fraction of the time.