Error when attempting to parse xhr response text in fineUploader
The following log message:
Error when attempting to parse xhr response text (SyntaxError: JSON.parse: unexpected end of data)
Generally indicates your server is not returning a valid JSON response. This is usually caused by an unexpected error server-side. Note that you must ALWAYS return a valid JSON response from your server. If you are using IE9 or older, be sure to return a response code of 200 as well.
I was also facing the same issue with my script which was working on local perfectly but not on server.
Some points we need to ensure:
Set the
endpoint
correctly as stated hereMake sure your directory where the script is about to upload the file initially (in my case it was example-advanced\uploads ) is write-able. It should have 777 permissions. I was having problem here.
max_file_upload_limit
should be set accordingly.
There might be more. But these are few that I have faced so far. Hope this would help somebody.