Using browse to insert an image in AEM component.

Avatar

Avatar

rohit_w

Avatar

rohit_w

rohit_w

20-12-2017

I have created a Component with an image using - granite/ui/components/foundation/form/fileupload. When I select a file from the DAM the image is displayed fine, but when I try to upload an image file by clicking on the browse button, no image is displayed in the component. Please help me out.

Accepted Solutions (0)

Answers (5)

Answers (5)

Avatar

Avatar

rohit_w

Avatar

rohit_w

rohit_w

25-12-2017

Thanks. Have you any links or support to help me with the same.

Avatar

Avatar

manish_anand

Avatar

manish_anand

manish_anand

25-12-2017

Hi,

it is because your component is looking for fileReference property which will have path of the image in DAM but when you upload any image using fileupload component it created file/ file.sftmp node and not filereference property.

there is a workflow which creates renditions at image node itself.

I think you need to overlay the component and try to customize it a bit according to your needs.

~Mnsh

Avatar

Avatar

rohit_w

Avatar

rohit_w

rohit_w

24-12-2017

Yeah the file is being uploaded to the given url (${suffix.path}).

I want to display the image in the page.

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

20-12-2017

Also this component uploads a file to a given URL. What do you want to do  - display an image in your page or upload it to a servlet?

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Reply

2.3K
smacdonald2008

20-12-2017

Is the file uploaded to the URL you specify?