These files get created at each level in the repository when a user creates content (uploads files) via WebDAV to the DAM. There are actually two files I think... .DS_Store and _.DS_Store...
Is there a way to avoid this / correct it?
Thanks,
Rob.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi Rob,
Yes this seems feasible, but AEM should not create these files. In fact this ignore ability was added in a very old version (5.3) so if it is occurring for you on a newer version, this can be reported to the Customer Care team to investigate and log the issue.
Thanks,
Mark
Views
Replies
Total Likes
Hi Rob,
would something like this work?
https://support.apple.com/en-ie/HT1629
I don't have a mac to test this on.
I'm not sure if AEM is able to prevent it, if you'd require an AEM solution, this should be checked with the Support team
Mark
Views
Replies
Total Likes
Thanks Mark.
This looks promising if the users are willing to make this configuration change.
I don't have a MAC to test on either...
Your response is appreciated.
Views
Replies
Total Likes
I did also find this thread: http://stackoverflow.com/questions/33129042/how-to-hide-hidden-files-in-aem-crxde-lite
Which suggests using an OSGi scheduler to simply delete them regularly from AEM.
package com.foo.bar; import org.apache.felix.scr.annotations.sling.SlingServlet; import org.apache.sling.api.SlingHttpServletRequest; import org.apache.sling.api.SlingHttpServletResponse; import org.apache.sling.api.resource.Resource; import org.apache.sling.api.resource.ResourceResolver; import org.apache.sling.api.servlets.SlingSafeMethodsServlet; import javax.jcr.query.Query; import javax.servlet.ServletException; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.io.PrintWriter; import java.util.Iterator; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @SlingServlet(paths={"/bin/deletedsstore"}) public class DeleteDSStoreServlet extends SlingSafeMethodsServlet { private static final long serialVersionUID = 1L; private static final Logger log = LoggerFactory.getLogger(DeleteDSStoreServlet.class); private static final String SQL2_QUERY = "SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/content]) and NAME() = '.DS_Store'"; private static final int SAVE_THRESHOLD = 100; @Override protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException, IOException { ResourceResolver resolver = request.getResourceResolver(); Iterator<Resource> resources = resolver.findResources(SQL2_QUERY, Query.JCR_SQL2); int deleted = 0; while (resources.hasNext()) { Resource resource = resources.next(); String path = resource.getPath(); resolver.delete(resource); log.info("Deleted node: " + path); deleted++; if (deleted % SAVE_THRESHOLD == 0) { resolver.commit(); } } if (resolver.hasChanges()) { resolver.commit(); } response.setStatus(HttpServletResponse.SC_OK); PrintWriter out = response.getWriter(); out.write("Deleted " + deleted + " .DS_Store nodes"); } }
Views
Replies
Total Likes
Hi Rob,
Yes this seems feasible, but AEM should not create these files. In fact this ignore ability was added in a very old version (5.3) so if it is occurring for you on a newer version, this can be reported to the Customer Care team to investigate and log the issue.
Thanks,
Mark
Views
Replies
Total Likes
Views
Likes
Replies