Added ajax support for image upload