If you get this error:
Invalid JSON response that means the server (
server/upload.php) is not sending a valid JSON fromat. This may be caused from a PHP error.
You can use the browser dev tools to see the actual errors and response from server.
In Google Chrome, right-click and select Inspect, or use the keyboard shortcut: Ctrl+Shift+I (or Cmd+Opt+I on Mac).
As you can see the response is a valid JSON frormat so there are no errors. But in case you get errors please follow the next steps.
If you get server errors about the file size, make sure you change the settings for
post_max_size in php.ini.
If you get errors in the Console tab about the Origin request make sure in
server/upload.php you accept the request from where you send it by adding:
header('Access-Control-Allow-Origin: yourwebsite.com'); header('Access-Control-Allow-Origin: www.yourwebsite.com');