if(formrequest.getItem("customerId")!=null){
int customerId = WebUtil.parameter2int(formrequest.getItem("customerId").getValue());
Customer customer = customerService.getById(customerId);
if(customer!=null){
FormRequestItem imgFile = formrequest.getItem("img")!=null?formrequest.getItem("img"):null;
String newFilename = "";
try{
newFilename = FileResources.saveFile(formrequest, imgFile, fileUploadImgPath+customer.getId()+"/");
}
catch(Exception e){
logger.error(e.getMessage());
uploadResult.setResult(0);
}