cancel
Showing results for 
Search instead for 
Did you mean: 

uploading an image from a jsp page and storing it in Media

0 Kudos

Hi, I am trying to upload the user profile picture while the user is registering. The PrincipalModel already has "profilepicture" attribute of type Media. Please let me know how to upload the user picture from the jsp page, I don't want to do it from hmc or impex.

Thanks in advance, Poornima

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Simply create your JSP and a new controller to handle the uploading of the image. Have a look at this for a clean example:

https://spring.io/guides/gs/uploading-files/

Then create a new facade which uses the MediaService to create your media with your image file data. There are a variety of methods to create your MediaModel with the data.