Save file to Document directory in liferay 6.1 using API

前端 未结 2 989
Happy的楠姐
Happy的楠姐 2021-01-03 17:31

I need to save a uploaded file in sub directory of Document & Media folder in liferay from web-form portlet.
I have extended the web Form portlet to do so, but file

2条回答
  •  死守一世寂寞
    2021-01-03 17:42

    I know it's an old question, but I had similar issue today. I used DLFileEntryLocalServiceUtil, and I had to call both addFileEntry() and updateFileEntry() in order to correctly create the asset.

    See Liferay DLFileEntryLocalServiceUtil.addFileEntry does not create AssetEntry record

提交回复
热议问题