We are importing a bunch of files into /content/dam/powerforms
The path we are using includes a subfolder like /content/dam/powerforms/accounting/CNP-XXX.xdp.
The createAsset API call creates an OrderedFolder.
Generally, the code is this:
String contentType = Files.probeContentType(Paths.get(xdpEntry.getPath()));
String fileAbsoultePath = output_dir.concat("/").concat(dirEntry.getName()).concat("/").concat(xdpEntry.getName());
InputStream targetStream = new FileInputStream(xdpEntry);
Asset asset = assetMgr.createAsset(fileAbsoultePath, targetStream, contentType, true);
The asset is created and all is good.
We are using the AEM Desktop app and trying to “check-out”, “edit”, and “upload changes”. It fails on the upload.
Here is the error:
04.11.2021 12:17:34.755 *INFO* [126.96.36.199  HEAD /api/assets/powerforms/accounting/CNP-463.xdp.json HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /api/assets/powerforms/accounting/CNP-463.xdp.json not found
04.11.2021 12:17:35.062 *ERROR* [qtp19520908-9055] com.adobe.granite.acp.platform.PlatformServlet No resource found at path: /content/dam/powerforms/accounting;resource=metadata
When I create a folder called "accounting2" using CRXDE, Desktop or TouchUI and move the same file into that folder, it works fine. I'm making the conclusion that it's not the file and it's the folder but, I have no idea.
Thanks in advance.
Solved! Go to Solution.