RollerMessages msgs = new RollerMessages();
// If save is allowed by Roller system-wide policies
if (fmgr.canSave(website.getHandle(), name, type, bits.length, msgs)) {
// Then save the file
fmgr.saveFile(website.getHandle(), name, type, bits.length, new ByteArrayInputStream(bits));
// TODO: build URL to uploaded file should be done in FileManager
String uploadPath = RollerFactory.getRoller().getFileManager().getUploadUrl();
uploadPath += "/" + website.getHandle() + "/" + name;
String fileLink = URLUtilities.getWeblogResourceURL(website, name, true);