Added image file format validation to UploadFile