Hi all
I have posted this on the github of the aem-upload library but would appreciate anyone here also can chime on this?
Views
Replies
Total Likes
Hi @kartheekd203042,
The issue you're encountering with the intermittent 404 error during asset uploads is likely related to timing or synchronization challenges when dynamically creating folders and immediately using them for uploads. This can happen if the folder creation process hasn't fully propagated or completed before the upload begins, even though you're checking for a 200 or 201 response.
To address this, I could recommend leveraging the Asset Folder Creator from the ACS Commons package. This tool is specifically designed to help quickly build complex Asset Folder hierarchies in AEM, ensuring that the folders are created efficiently and reliably before any assets are uploaded.
Views
Replies
Total Likes
Thanks @giuseppebag for the quick response.
Do note that this folder creation is happening from an Azure Function being managed by an external team. They are using the REST APIs to do all these operations and using the aem-upload library. I am not sure how ACS can help this use case unless we customize to expose this ACS tool via another custom API? Sorry if I understood it incorrectly but please feel free to chime in.
Views
Replies
Total Likes
hi @KARTHEEKDE2, If using the ACS tool isn't feasible, you can consider creating the necessary folder structure via API before executing the aem-upload command. This way, you can ensure that the folder hierarchy is fully established before initiating the upload process.
Here's an example of a curl command, which can easily be converted into JavaScript code for integration with the aem-upload process:
curl -u admin:admin \
-F":name=MyFolder" \
-F"jcr:primaryType=sling:Folder" \
http://localhost:4502/content/dam/folderName
Views
Replies
Total Likes
Thanks for the response - the folders are created dynamically based on the new products created and they are using a similar command as above.
The aem upoad library recommended seems to have an issue so working with Adobe support on this as of now.
Views
Replies
Total Likes
Please keep us updated whenever you have the chance.
Views
Replies
Total Likes