Uploading a file to a specific folder of the web application in liferay ..?

I am using liferay 6.0.5. I am uploading a file using the following code.

UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
String submissionFileName = uploadRequest.getFileName("file");//uploaded filename
File submissionFile = uploadRequest.getFile("file");

      

this works fine and uploads the file to tomcat temp directory with different name. I want ... "There is one folder in my project directory. I want to upload a file to this directory." How to do it in liferay ..?

+3


source to share


2 answers


If you want to change the temp directory for the file upload, you can change the following property in portal -ext.properties:

com.liferay.portal.upload.UploadServletRequestImpl.temp.dir=C:/MyTempDir

      



Hope this is what you are looking for.

+2


source


+1


source







All Articles