if (!assetExists(packageName, assetName)){
throw new WebApplicationException(Response.status(500).entity("Asset [" + assetName + "] does not exist in package [" + packageName + "]").build());
}
AssetItem ai = repository.loadPackage(packageName).loadAsset(assetName);
ai.checkout();
ai.updateDescription(asset.getDescription());
ai.updateBinaryContentAttachmentFileName(asset.getMetadata().getBinaryContentAttachmentFileName());
ai.updateFormat(asset.getMetadata().getFormat());
ai.updateBinaryContentAttachment(is);
ai.getPackage().updateBinaryUpToDate(false);