Expand my Community achievements bar.

SOLVED

Uploading files through servlet call

Avatar

Level 4

Hi,

I am referring to this link to know how to upload attachments in AEM through servlet call. I am using AEM 6.2 SP1.

https://helpx.adobe.com/experience-manager/using/post_files.html

I am able to successfully upload the file in to AEM. The issue i am running in to is reading the remaining form data. The HTML i had on the page is Choose file to upload

           

I am using for loop as mentioned in the article above and i added loggers to check whether i am getting values in the text box which i added as Bob, James, smith in the servlet call. I am not getting that information at all.

Is there another way to get the information? Is there any other example i can check which form data and file upload will be present and accessible through and in one servlet call in AEM?

Thanks,

Trinesh

1 Accepted Solution

Avatar

Correct answer by
Level 10

That article was to show you how to handle a file - not text data. If you want to read the  text data - you need to alter the Java data on the back end.

See - Apache Sling :: Request Parameter Handling in Sling

This thread shows logic too that handles a form and form field - Writing Files to the JCR using a Sling Servlet

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

That article was to show you how to handle a file - not text data. If you want to read the  text data - you need to alter the Java data on the back end.

See - Apache Sling :: Request Parameter Handling in Sling

This thread shows logic too that handles a form and form field - Writing Files to the JCR using a Sling Servlet