"File Upload Disconnected. Please try again." in ERPNext: v11.1.18

Adding the [sitename] used when creating the site with
bench add-site [sitename]
to the hosts file and calling that [sitename] from the browser fixed a similar issue for me
Maybe that’ll work for you

Discussed here