AssetManager copyAsset method not working
I'm trying to implement a copy function in one of my workflow process, however the assetCopy method isn't working.
This is how I initialized and called the assetManager obj using this API com.adobe.granite.asset.api.AssetManager:
ResourceResolver resourceResolver = resolverFactory.getAdministrativeResourceResolver(null);
AssetManager am = resourceResolver.adaptTo(AssetManager.class);
String assetPath = "/content/dam/somefile.pdf";
String copyPath = "/content/dam/html/copiedfile.pdf";
am.copyAsset(assetPath, copyPath);
I've verified it's initialized properly by using the assetExists method and everything seems to be fine so not sure what the problem here can be.
Thanks