private String processPicasaFile(FileItemStream fileItem, byte[] data,
Map<String, String> parameters) throws UploadException {
try {
String albumId = parameters.get("albumId");
if (StringUtils.isEmpty(albumId)) {
throw new UploadException(Messages.get("album_not_found",
albumId));
}
getBusiness().getPicasaBusiness().upload(albumId, data,
fileItem.getName());
return createMessage("success", Messages.get("photo_uploaded"));
}
catch (Exception e) {
throw new UploadException(e.getMessage());
}
}