I would lke to add a Script Editor to the SharePoint Document Library's Upload.aspx page to do something similar to https://www.c-sharpcorner.com/article/pre-save-action-on-document-libraries-in-sharepoint-2013-and/ but on Upload. Any idea how this can be achieved?
[Must be working]
2. Create custom Upload page. Like here. You need to create custom Application page in Visual Studio, deploy it through feature, feature must update SPWeb.CustomUploadPage property.
3. Note: If your PreSave logic doesn't contain any validation logic, just additional actions like if document uploaded then new list item must be created in another list or similar things.
Add event-based (event receiver, workflow) or periodically running code (Console App, Windows Service, Timerjob, PowerShell script) that will perform your actions.
[Not working - See comments]
Open Upload.aspx page, browser right corner Gear icon, Edit Page, add your script editor web part, click Stop Editing button. It will work correctly.
In guide on c-sharpcorner they use ribbon "Default Edit Form" button because they don't want to think what form is default. Forms count can be multiple. Upload page in one instance.