How to use the AEM Asset Selector in a dialog?

kalyanc42390873

25-07-2018

As per document Asset Selector ,   http://localhost:4502/aem/assetpicker.html?dialog=true  Use these parameters to open the asset selector as Granite Dialog. This option is only applicable when you launch the asset selector through Granite Path Field, and configure it as pickerSrc URL.

I tried the following code in the dialog XML:

<image
  
jcr:primaryType="nt:unstructured"
  
sling:resourceType="granite/ui/components/coral/foundation/form/pathfield"
  
name="./videoThumbnail"
  
pickerSrc="/aem/assetpicker.html?dialog=true"

   mimeType="image"
  
rootPath="/content/dam"/>

The pathfield above does not seems to use the alternative picker specified by the pickerSrcand behaves like a standard pathfield.

Also tried adding the extra URL parameters as specified in the pathfield docs but that made no change.

Please provide ur inputs how to configure assetpicker in dialog.

Regards,

Kalyan.

Accepted Solutions (1)

Accepted Solutions (1)

Answers (7)

Answers (7)

Arun_Patidar

MVP

18-10-2018

It does works if you'll be using below path for pickerSrc

/libs/dam/gui/content/assetselector/jcr:content/body/items/assetselector.html?dialog=true&assettype=images&root=/content/dam/we-retail/en/activities

Thanks

Arun

Arun_Patidar

MVP

07-09-2019

use /libs/dam/gui/content/assetselector/jcr:content/body/items/assetselector.html?dialog=true

but still there is a bug, it will not allow selecting assets from assets selector.

you can log a daycare ticket.

Maruti_Prasad

04-09-2019

The pickerSrc is not working with values "

/libs/dam/gui/content/assetselector/jcr:content/body/items/assetselector.html?dialog=true& assettype=images&root=/content/dam/we-retail/en/activities"

or

"/aem/assetpicker.html?dialog=true" anyone got the assetpicker ?