byte fileData[] = file.getFileData();
ActionMessages errors = validateUploadImage(form, file);
if (errors.size() != 0) {
jsonResult.put("status", Constants.WEBSERVICE_STATUS_FAILED);
jsonResult.put("message", resources.getMessage("error.string.required"));
streamWebService(response, jsonResult.toHtmlString());
}
ImageScaler scaler = null;
try {
scaler = new ImageScaler(fileData, file.getContentType());