掲示板
Files and Folder upload in Liferay Document Library
10年前 に Rhina Karr によって更新されました。
Files and Folder upload in Liferay Document Library
Junior Member 投稿: 86 参加年月日: 10/11/02 最新の投稿
In Liferay 6.2 CE/EE, is there any api to upload all files and folders (from a local drive e.g. C:\abc) into Liferay document library?
Liferay sync can be used to achieve this, but do I have to subscribe it separately for EE version?
Thanks,
Rk
Liferay sync can be used to achieve this, but do I have to subscribe it separately for EE version?
Thanks,
Rk
10年前 に Gnaniyar Zubair によって更新されました。
RE: Files and Folder upload in Liferay Document Library
Liferay Master 投稿: 722 参加年月日: 07/12/19 最新の投稿
You can try Document Library Services pro grammatically to add your documents :
1. Retrive documents from your file system
2. use this service to store into Liferay Document repository:
1. Retrive documents from your file system
2. use this service to store into Liferay Document repository:
DLFolder folder = DLFolderLocalServiceUtil.addFolder(userId,
groupId, groupId, false, 0, "<folder-name>", "",serviceContext);
DLAppLocalServiceUtil.addFileEntry(userId, groupId, folder.getFolderId(), fileName, new MimetypesFileTypeMap().getContentType(file), fileName, "", "", file,serviceContext);</folder-name>
9年前 に Muhammad Ghufron によって更新されました。
RE: Files and Folder upload in Liferay Document Library
New Member 投稿: 18 参加年月日: 14/08/08 最新の投稿
Hi Gnaniyar Zubair,
Thanks for your suggest, I have successfully made a simple porlet to upload file into document library,
but I have question regarding your code :
I am using liferay 6.2 ce ga 2, and in my liferay IDE it's deprecated,so i try to find another solution to fix it, currently im using this method
to get DLFolder entity :
Im still confuse about parameter groupId and parentFolderId, where i can get groupId and parentFolderId,
currently i try to see in my database value and write hard code to fill parameter groupId and parentFolderId,
thanks for your advice
Thanks for your suggest, I have successfully made a simple porlet to upload file into document library,
but I have question regarding your code :
DLFolder folder = DLFolderLocalServiceUtil.addFolder(userId,groupId, groupId, false, 0, "<folder-name>", "",serviceContext);
</folder-name>
I am using liferay 6.2 ce ga 2, and in my liferay IDE it's deprecated,so i try to find another solution to fix it, currently im using this method
to get DLFolder entity :
DLFolder folder = DLFolderLocalServiceUtil.getFolder(groupId, parentFolderId, name);
Im still confuse about parameter groupId and parentFolderId, where i can get groupId and parentFolderId,
currently i try to see in my database value and write hard code to fill parameter groupId and parentFolderId,
thanks for your advice
9年前 に Muhammad Ghufron によって更新されました。
RE: Files and Folder upload in Liferay Document Library
New Member 投稿: 18 参加年月日: 14/08/08 最新の投稿
Hi Gnaniyar Zubair,
I got solution :
https://www.liferay.com/community/forums/-/message_boards/message/1065754
thank you very much, I am newbie in liferay
I got solution :
https://www.liferay.com/community/forums/-/message_boards/message/1065754
thank you very much, I am newbie in liferay