We were uploading some videos into the Media section of a customers website when we got the error “Unexpected response from the server. The file may have been uploaded successfully. Check in the Media Library or reload the page.” We uploaded 5 videos and only 3 uploaded. The other two had an error. These two videos where 30 megabytes each and the Media Library had a limit of 40 megabytes, so it should have uploaded.
File size seemed to be the issue, but we didn’t have access to the CPanel yet to change the PHP.ini file. We were working localhost, and were able to add some PHP code to our Functions.php file in the our child theme. This didn’t solve the issue. Our upload limit in the media library upload say we can do up to 256 megabytes now.
We cleared the cache, and still had the issue. We found something on StackExchange that mentioned the “Security” plugin.
We disabled the Security plugin, and we were able to upload the videos. We turned the Security back on, and we could still upload.
Let us know if this helped you…