File Upload in Document Library of Liferay:- First we need to create the folder in the Document Library of Liferay. In my case the folder is created with dentalnoteDocuments name.
In below code AddInfo.jsp we can take simple AUI FORM to insert some AUI INPUT tags to insert the patient information and use the AUI:INPUT type file to select the file from the local system after the form submission the call will go to the AddPatient.java file and there we can get the UploadPortletRequest object from the actionRequest.
Then after we can validate the uploadRequest object to ensure that the file size is greater then 0 and uploaded file name should not be null. if it is true then the file is uploaded in the dentalnoteDocuments (which I have created manually from administrator account in Liferay ) folder inside the Liferay Document Library.