Uploaing images via ajax. Trying to generate json response.