掲示板

Documents and media file conversion

11年前 に Roy Nahra によって更新されました。

Documents and media file conversion

New Member 投稿: 14 参加年月日: 12/04/03 最新の投稿
Hi All,

I want to automatically convert a file while adding it in the documents and media portlet.
I already made the Open Office integration within liferay and it works.
But i need to control the document's format while uploading it to the portlet.

Any suggestions?

thanks.
11年前 に prashant deshpande によって更新されました。

RE: Documents and media file conversion

New Member 投稿: 16 参加年月日: 10/06/17 最新の投稿
Files are added in
"updateFileEntry" method in "com.liferay.portlet.documentlibrary.action.EditFileEntryAction" class

fileEntry = DLAppServiceUtil.addFileEntry(
repositoryId, folderId, sourceFileName, contentType, title,
description, changeLog, inputStream, size, serviceContext);

above code makes file entry, try to UPDATE same fileEntry Object by setting

public void setExtension(String extension);
public void setMimeType(String mimeType);

and using "updateDLFileEntry()" from "com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil" class
11年前 に Roy Nahra によって更新されました。

RE: Documents and media file conversion

New Member 投稿: 14 参加年月日: 12/04/03 最新の投稿
Thanks for you response,

I searched for the mentioned class, and i found several classes related to the document library such as "upload_005fmultiple_005ffile_005fentries_jsp.java".
But i didn't find the "EditFileEntryAction" class.

Where can i find it?
11年前 に prashant deshpande によって更新されました。

RE: Documents and media file conversion

New Member 投稿: 16 参加年月日: 10/06/17 最新の投稿
If you have portal src code then you can get this class in
"/portal-impl/src/" Its a struts action class.
You cal override this class using plugin-ext/docroot/WEB-INF/ext-impl/