I need to upload just 2 new icons to design folder
but as this folder is of type nt:folder
i can not upload any file.
As I get ConstraintViolation
Please help...
Is it possible to change folder type?
Solved! Go to Solution.
Views
Replies
Total Likes
The solution i got from someone who is experienced with ADOBE AEM:
copy pictures to the appropriate folder inside the project
use maven build to deploy them directly to the server.
that worked!
thank you all for help.
Views
Replies
Total Likes
Hi
Please have a look at couple of articles, this might will help you:-
// Underneath a node of type nt:folder you can only add a child node that
extends the type nt:hierarchyNode (nt:file, nt:folder or nt:linkedFile) but
not a node of type nt:unstructured.
If you would change that or change the type of the sub node then you will
probably succeed.
//
JCRNodeWrapper FFolder = session.getNode("/sites/demo/files").addNode("css", "jnt:folder");
FFolder.uploadFile("myFile.pdf", inputStream, "application/pdf");
session.save();
I hope this would help you.
Thanks and Regards
Kautuk Sahni
Views
Replies
Total Likes
thank you a lot...
i will try it and let you know.
have a nice day
Views
Replies
Total Likes
i created this HTML
<form action="http://localhost:4502/etc/designs/ourproject/static/images/*" method="POST" enctype="multipart/form-data">
<input name="./new_file.png" type="file">
<input name="./jcr:primaryType" value="nt:file" type="hidden">
<input name="./jcr:content/jcr:primaryType" value="nt:resource" type="hidden">
<input name="./jcr:content/jcr:mixinTypes" value="cq:ReplicationStatus" type="hidden">
<input name="./jcr:content/jcr:mimeType" value="image/png" type="hidden">
<input name="./jcr:content/jcr:data" value="view" type="hidden">
<input type="submit">
</form>
but still get the same error on Submit
The solution i got from someone who is experienced with ADOBE AEM:
copy pictures to the appropriate folder inside the project
use maven build to deploy them directly to the server.
that worked!
thank you all for help.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies