Fixed multiple image upload javascript