Especially on login session timeouts, when someone has left the page open too long before uploading.
At the conclusion of the upload, they get a head-scratcher. I think the error message given is:
SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON
which means nothing to an average user. It would be great if we could somehow parse out the error and display meaningful messages.
175 should fix this. I added a couple of checks to see if the request was sent through AJAX and if yes, send a JSON response. Also added a check to see if the user is logged in (only after checking for groups). It looks like in production, if the user is not logged in, he cannot see the uploader page.
Especially on login session timeouts, when someone has left the page open too long before uploading.
At the conclusion of the upload, they get a head-scratcher. I think the error message given is: SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON which means nothing to an average user. It would be great if we could somehow parse out the error and display meaningful messages.