PageEntity page = getDao().getPageDao().getById(pageId);
if (page == null) {
throw new UploadException(Messages.get(
"page.not_found", pageId));
}
FolderEntity folder;
String folderPath = "/page" + page.getFriendlyURL();
folder = getBusiness().getFolderBusiness().createFolder(folderPath);
FileEntity file = processResourceFile(imageItem, data, folder);
return "<script type=\"text/javascript\">"
+ " window.parent.CKEDITOR.tools.callFunction("