Uploading files to Liferay server

随声附和 提交于 2019-12-08 10:32:16

问题


I'm using Liferay 6.2 CE and I would like to add a simple functionality in which administrator can upload files to liferay server and add hyperlink to this file on the page.

I've found in Liferay's 6.1 documentation that in that version administrator could just create a data list and add File Upload field there as shown below:

Unfortunately in Liferay 6.2 this field doesn't exist (I'm confused here what's the reason):

I also saw that during new blog post creation, there is this HTML in-browser editor that has functionality to add images. When pressed, user can select a file from a hard drive which is then uploaded to liferay server and added as <img> tag to the blog editor and links to directory that looks like that: /documents/11469/0/UPLOADED_FILE.zip/.

But it's not intuitive for a user to upload normal files (e.g. .zip file), by using image uploader and manually editing the source code to change <img> tags to normal <a> anchors.

So my question is whether I need to solve described problem programatically using API (I believe that DLFileEntryLocalServiceUtil is used for that purpose) or is there any other way to achieve this using liferay functionalities?


回答1:


The "FileUpload" field by Liferay 6.1 is renamed to "Document" field in Liferay 6.2.



来源:https://stackoverflow.com/questions/21087339/uploading-files-to-liferay-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!