How to add custom metadata value to an image such that it retains while the image is downloaded and extracted on the next upload of the image in AEM? - metadata

In order to add a custom metadata field inside Adobe Experience Manager, you can create any new custom metadata field in the metadata schema but that gets associated with the image only internal to the tool.
My requirement is to add custom metadata fields to an image such that on the download of the same, the custom metadata added is also associated with image and on extraction of metadata the value for those fields are intact with the image.
Any ideas to do it in AEM tool or to do it with Java would be of utmost help. Thanks!

Related

get asset properties on htl page with asset path without using backend service in crx

I have an asset path, which contains an asset, which I want to display in the UI. I can display the image using the path. But I want to display asset properties like title and other metadata which are present in jcr:content under that asset path.
One way I'm aware of is to use backend service and adapt to the asset and fetch those properties and send it to html file. Is there any way I can directly fetch those details in html file itself without having to use backend service.
note: asset number can be very high, would it better to use the service itself.
It's best to use the (backend service) Asset APIs but you could also hack your way with just HTL if you know exactly the JCR node and property. data-sly-use allows specifying a JCR path to return the org.apache.sling.api.resource.Resource:
<sly data-sly-use.myImg="/content/dam/core-components-examples/library/adobe-logo.svg/jcr:content/metadata">${myImg.valueMap['dc:title']}</sly>
Example for asset title.
${item.metadata['dc:title']}

AEM 6.4 asset renditions, is it safe to remove all the rendition

I have created a custom workflow model for DAM update asset. I have kept two steps only Metadata Processor and DAM Update Asset Workflow Completed
I am on 6.4 and I could see 319x319 rendition is used in content finder. Want to know if other renditions are used by any default AEM components? If used, is there any possibility to make all of them point to a single rendition?
You can safely remove all renditions, if, in fact, you do not use them at all and you display the raw image from your DAM (the only downside is that your Content Authors will lose several thumbnails, usually helpful to identify the asset they want to use). If you need image manipulation and optimization, you can review ACS Commons Named Transform Image Servlet or any other external service (Akamai, Adobe Dynamic Media).

Add custom metadata fields for DAM assets in a particular folder

I created custom metadata fields for DAM Assets in CQ 5.6.1 using the steps detailed here. However, as described in the document, these changed fields are available for ALL assets in the DAM.
I need these metadata fields to be made available to only a specific folder, say /content/dam/foo instead of every asset.
How can I achieve this?
In my knowledge, there is no straight forward way to achieve this but there is one trick to handle this.
AEM DAM has the notion of meta schema editors. These editors are tied to asset file type, meaning - jpeg, mov, etc. For an asset MIME type, you can define the meta data and its associated form.
AEM 6.0 provides choral UI interface to achieve this --
http://localhost:4502/libs/dam/gui/content/metadataschemaeditor/schemalist.html/dam/content/schemaeditors/forms
Am not aware of any such interface in AEM 5.6.1. The nodes tied to this are at /libs/dam/content/asseteditors/image/jpeg/formitems. You could overlay them at /apps to add the required metadata.
Coming to the question, the trick is to add the file type into your dam content hierarchy. Example - /content/dam/jpeg/foo, /content/dam/png/foo, etc. This way, you would get different metadata for different folders of the dam.
Adobe recommends this approach as AEM 6.0 introduced the concept of processing profiles which you could attach to folders. This way, your different file types could get different treatments.

How to create custom metadata tag for CQ

I am trying to create a custom metadata tag for all JPEG images. Following the documentation this is what I did in /apps
However, when I upload a new JPEG file I don't see the tag I've added (Atest)
Am I missing something? I copied /libs/dam/content to /apps/dam/content and just kept the assetededitors folder and I modified the formitems under the image/jpeg folder as shown in the screenshot.
The asseteditors node allows you to change the classic DAM metadata editor, available under the /damadmin. The screenshot attached in the comment presents new touch UI which can be enhanced using Javascript as in this article.

how to push component state changes to multiple different pages using icefaces

In my project i want to upload a image in one page(ie:in one view),after uploading the image event is generated and bean1 is executed.please provide a solution for updating the loaded image to another page(ie second view)in which i use GraphicImage component.how to refer second view components in bean1 without generating event from second view.
Is it possible to do ajax push using icefaces 1.8.2 as discussed above.
IceFaces uploads a file to a specific path, given by
{Application Root}/{Upload directory}/{Session ID}
The Upload Directory is specified in web.xml. The Session ID folder is optional, depending on whether you specified the "uniqueFolder" attribute in the tag. You can also set the upload path as an attribute in the tag.
You can store the file path in a String or in a session variable through actionListener for the inputFile.
To refer to this path String from Bean2 without using the backing bean, you can bind your components to "#{Bean1.pathString}". If you want to use the backing-bean, you can do:
((Bean1) geBean("Bean1")).getPathString()
but only if you extend from AbstractPageBean. Also, Bean1 should be session scoped for either case.