Skip to content

Instantly share code, notes, and snippets.

@aanchalsikka
aanchalsikka / Fileuploaddialog.xml
Last active September 26, 2023 06:10
File upload dialog
<file
granite:class="cmp-image__editor-file-upload"
jcr:primaryType="nt:unstructured"
sling:resourceType="cq/gui/components/authoring/dialog/fileupload"
class="cq-droptarget"
enableNextGenDynamicMedia="{Boolean}true"
fileNameParameter="./fileName"
fileReferenceParameter="./fileReference"
mimeTypes="[image/gif,image/jpeg,image/png,image/tiff,image/svg+xml]"
name="./file"/>
<!-- Declare the embedded in the corressponding section -->
<!-- Netcentric ACL Tool -->
<embedded>
<groupId>biz.netcentric.cq.tools.accesscontroltool</groupId>
<artifactId>accesscontroltool-package</artifactId>
<!-- classifier used for AEM as a Cloud Service instance -->
<classifier>cloud</classifier>
<type>content-package</type>
<target>/apps/techrevel-vendor-packages/application/install</target>
</embedded>
<!-- ====================================================================== -->
<!-- B U I L D D E F I N I T I O N -->
<!-- ====================================================================== -->
<build>
<plugins>
<plugin>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>filevault-package-maven-plugin</artifactId>
<configuration>
<packageType>mixed</packageType>
<!-- Netcentric ACL Tool -->
<dependency>
<groupId>biz.netcentric.cq.tools.accesscontroltool</groupId>
<artifactId>accesscontroltool-package</artifactId>
<!-- classifier used for AEM as a Cloud Service instane. Leave out for On-premise -->
<classifier>cloud</classifier>
<type>content-package</type>
<version>3.0.9</version>
</dependency>
<!-- Oak Index for Netcentric ACL Tool -->
package blog.techrevel.api;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import org.apache.commons.codec.binary.Base64;
package com.techrevel.dam.core.servlets;
import java.io.IOException;
import java.util.Dictionary;
import javax.servlet.Servlet;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.SlingHttpServletResponse;
import org.apache.sling.api.servlets.HttpConstants;
package com.techrevel.dam.core.workflows;
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import javax.jcr.Binary;
import javax.jcr.Node;
package blog.techrevel.servlet;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import javax.jcr.Node;
import javax.jcr.NodeIterator;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
package com.techrevel.dam.core.fmdita.listeners;
import java.util.HashMap;
import java.util.Map;
import org.apache.jackrabbit.JcrConstants;
import org.apache.sling.api.resource.LoginException;
import org.apache.sling.api.resource.ResourceResolver;
import org.apache.sling.api.resource.ResourceResolverFactory;
import org.osgi.service.component.annotations.Component;
package com.techrevel.dam.core.servlets;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.jcr.Node;
import javax.jcr.RepositoryException;