Expand my Community achievements bar.

SOLVED

how to map fileupload resourcetype field in AEM Sling model class in AEM as a cloud service?

Avatar

Level 5

Hi, I want to know which properties should I be using to get the value from the resourceType : fileUpload

 

for e.g for textFields I am able to get values in my Sling model class by using annotation :

                                @ValueMapValue

                                   private String {"name field of my node"}

 

I am not able to fetch by using "name " field of type fileUpload

 

Please anyone explain me how can I access it in my sling model , I need the  path of the file uploaded

 

Thank you

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

Can you please share the node structure, where the file is uploaded or content is authored.

please share component authored values from crx, this will help us to provide guidance.

 

Generally, the valuemap map the properties and values but if you have child node then you need to inject those as type/Resource etc.



Arun Patidar

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi,

Can you please share the node structure, where the file is uploaded or content is authored.

please share component authored values from crx, this will help us to provide guidance.

 

Generally, the valuemap map the properties and values but if you have child node then you need to inject those as type/Resource etc.



Arun Patidar