Hello, what happens is that I am following the guide of:
To modify a just a file called fileupload.js that is in charge of validating information and uploading the asset in AEM using DAM.
What happens is that I am in the final step where only remains to add the path of the file that I created in filter.xml.
But when I add the complete path that would be the following one:
/apps/dam/gui/coral/components/commons/fileupload/clientlibs/fileupload/js
I get the following error:
is not covered by any of the specified dependencies nor a valid root
But when I add the path in short version it allows me to do the following:
/apps/dam
But when I do the DAM when I click on create to upload an asset, the button does not work anymore.
What can I do in this case?, I already try to add the differents mode (replace, merge and update) and add the complete path but nothing of this works.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @Aaron_Dempwolff
I guess this is related to another thread to avoid space in filename.
There is a correction to the solution. As per the latest code from AEM SDK, the filename validation in Coral UI is done via
Filename: /libs/dam/gui/coral/components/admin/clientlibs/damutil/js/util.js
Function: getInvalidFileChars()
We just need to overlay this js in /apps
Update the function to:
function getInvalidFileChars() {
return [ "*", "/", ":", "[", "\\", "]", "|", "#", "%", "{", "}", "?", "&" , " "];
}
And it should work. Apologies I had shared earlier answer based on my past experience. But there seems to have been an update.
I have tried the solution from current thread. It will stop user from uploading file with space
Hello @Aaron_Dempwolff
You would need to declare the parent paths in pom.xml of ui.apps.structure module. Example
<filter><root>/apps/dam/gui/coral/components/commons/fileupload/clientlibs/fileupload/js</root></filter>
<filter><root>/apps/dam/gui/coral/components/commons/fileupload/clientlibs/fileupload/</root></filter>
<filter><root>/apps/dam/gui/coral/components/commons/fileupload/clientlibs/</root></filter>
Please check till which parent level you need to declare explicitly.
The validator is trying to make sure that we do not deploy a child node, without a parent node:
- Being available in AEM
- Being deployed via code.
Also, please make sure that if we are creating any parent node via code, it should have proper jcr:primaryType, else we might run into issues later.
I try you solution but still giving me the same error when I add the complete path in the filter.xml file, I tried with the paths that you gave me and even try a bunch of paths with / at the end or without it.
Have to tried deploying ui.apps after ui.apps.structure. Or just ui.apps?
I'm working on local first, I run the command mvn clean install -PautoInstallPackage to build the project
So first build the ui.apps folder then the ui.apps.structure folder.
Is necessary to add the same path in the pom.xml of ui.apps?
Hello @Aaron_Dempwolff,
To add with @aanchal-sikka, make sure you have all your filter(s) inside a parent tag filters:
<filters>
<filter><root>/apps/{project-name}</root></filter>
<filter><root>....</root></filter>
<filter><root>....</root></filter>
</filters>
Thanks
Yes, this is something I forgot to add, but even adding it still doesn't work.
Hello @Aaron_Dempwolff,
I think you placed the filters in the wrong place, it should be under build configuration in the pom.xml under your ui.apps.structure module as follow:
<build>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<configuration>
<properties>
<cloudManagerTarget>none</cloudManagerTarget>
</properties>
<filters>
<filter><root>/apps/{project-name}</root></filter>
<filter><root>....</root></filter>
<filter><root>....</root></filter>
</filters>
</configuration>
</plugin>
</plugins>
</build>
Yes, I have that format but doesn't works, this is the pom.xml file
And this is the filter.xml file:
By adding the path on filter.xml throws and error
Update: Now I can build the project, only I need to delete the cache with the command:
mvn clean.
But my changes don't show it when the asset is uploaded on DAM, is necessary to do something else to make my changes work?
Hello @Aaron_Dempwolff
I guess this is related to another thread to avoid space in filename.
There is a correction to the solution. As per the latest code from AEM SDK, the filename validation in Coral UI is done via
Filename: /libs/dam/gui/coral/components/admin/clientlibs/damutil/js/util.js
Function: getInvalidFileChars()
We just need to overlay this js in /apps
Update the function to:
function getInvalidFileChars() {
return [ "*", "/", ":", "[", "\\", "]", "|", "#", "%", "{", "}", "?", "&" , " "];
}
And it should work. Apologies I had shared earlier answer based on my past experience. But there seems to have been an update.
I have tried the solution from current thread. It will stop user from uploading file with space
Thank you, with this solution that you gave me it worked.
I have one more question, do you know if in this same file it is possible to change the characters of the image when uploaded in DAM?
For example I can already launch the warning when it contains space and doesn't let upload it, but if you upload an asset that contains the + character (for example: my+asset.jpg) when the user clicks on the upload button or before the upload button appears, the name will remove the +, leaving myasset.jpg as the result.
Hello @Aaron_Dempwolff
I will check and get back to you. Meanwhile, can you possibly create a separate thread, because the requirement is different?
Seperate thread help people search for questions and corresponding answers in an easier manner.
Okey, thanks a lot, here is the new thread: https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/which-dam-file-and-method-...
Views
Likes
Replies