How do I edit a document uploaded to a project page?

Editing a document uploaded to a project page cannot be done on the UI. To edit a document: