If you are encountering this error in WordPress while uploading files in Media, I have a solution that worked for us.
Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.
Downgrade your PHP version to 7.2 version. We were encountering problem with 7.4 version and downgrading to 7.2 has resolved the problem. Here I have shared the picture of how to downgrade PHP version in Godaddy WHM panel. You can follow similar way with your hosting provider.