I am trying to create assets in DAM using AssetManeger. I am calling the createAsset method two times. but one asset is creating successfully but another one is not getting successfully created. One is showing pending.
Asset asset = createAsset(resourceResolver, mainCsvInputStream, filePath);
Asset report = createAsset(resourceResolver, reportInputStream, reportFilePath);
private Asset createAsset(ResourceResolver resourceResolver, InputStream inputStream, String path){
AssetManager assetManager = resourceResolver.adaptTo(AssetManager.class);
return assetManager.createAsset(path, inputStream, "text/csv", true);
}
In crx 1st one is showing
dam:assetState | String | unProcessed |
Any idea will be appreciable.
Thanks