Hi Adrian,
When you say "I try to upload a PDF to a lesson" are you actually using the term "lesson" in the specific meaning it has in Moodle, i.e. the Lesson activity? If not, then your question is not related to this Moodle Lesson activity forum. Please re-post to the Moodle.org General Problems forum.
Joseph