update ajax function for multiple image upload.