更新时间:2022-11-05 13:30:06
如果要更改文件上传的临时目录,则可以在portal-ext.properties中更改以下属性:
com.liferay.portal.upload.UploadServletRequestImpl.temp.dir = C:/ MyTempDir
希望这是您要找的。 p>
I am using liferay 6.0.5. I am uploading file using following code.
UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
String submissionFileName = uploadRequest.getFileName("file");//uploaded filename
File submissionFile = uploadRequest.getFile("file");
this works fine and upload file in tomcat's temp directory with some different name. What I want is.."There is one folder docs in my project directory. I want uploaded file in this directory". How to do this in liferay..?
If you want to change the temp directory for the file upload then 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.