掲示板

Liferay 7 Documents and Media File Storage

7年前 に Marcel Liphardt によって更新されました。

Liferay 7 Documents and Media File Storage

Junior Member 投稿: 28 参加年月日: 17/01/04 最新の投稿
Greetings,

I would like to know the best way maybe through the portal-ext.properties, how I can store files we uploaded into the documents and media portlet in the database and "not" on the front end. Currently and by default Liferay stores all files in the Liferay ".home" folder and why would u want that if you are having a database exactly for that purpose?
thumbnail
7年前 に Jorge Díaz によって更新されました。

RE: Liferay 7 Documents and Media File Storage

Liferay Master 投稿: 753 参加年月日: 14/01/09 最新の投稿
Use DBStore, see: https://dev.liferay.com/discover/portal/-/knowledge_base/7-0/repository-types
But be careful, use only in case of storing a low number of archives because can hurt your database throughput
7年前 に Marcel Liphardt によって更新されました。

RE: Liferay 7 Documents and Media File Storage

Junior Member 投稿: 28 参加年月日: 17/01/04 最新の投稿
Jorge Díaz:
Use DBStore, see: https://dev.liferay.com/discover/portal/-/knowledge_base/7-0/repository-types
But be careful, use only in case of storing a low number of archives because can hurt your database throughput


Hi Jorge, thanks for your reply.
Ok, but I think that a better aolution for me would be if all our files on the frontend would be transferred into a folder on our backend. Is there another method or do I have to share a folder on the backend to achieve this?
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: Liferay 7 Documents and Media File Storage

Liferay Legend 投稿: 6396 参加年月日: 08/09/23 最新の投稿
Marcel Liphardt:
Ok, but I think that a better aolution for me would be if all our files on the frontend would be transferred into a folder on our backend. Is there another method or do I have to share a folder on the backend to achieve this?


I don't know what you mean with "frontend" and "backend" - but if you just refer to a different location of the data in the filesystem: You can configure this. ${liferay.home}/data/document_library is just the default, but it's changeable.

This used to be a setting in portal(-ext).properties, but I assume this now was moved to the configuration API, so you can find its configuration in ControlPanel.
7年前 に Marcel Liphardt によって更新されました。

RE: Liferay 7 Documents and Media File Storage

Junior Member 投稿: 28 参加年月日: 17/01/04 最新の投稿
Dear Olaf,
our frontend stands for the webpage, so the Liferay instance's home folder and the backend referrs to the database itself.
So I mean that our files need to be stored on another Server's filesystem.
thumbnail
7年前 に Olaf Kock によって更新されました。

RE: Liferay 7 Documents and Media File Storage

Liferay Legend 投稿: 6396 参加年月日: 08/09/23 最新の投稿
Marcel Liphardt:
So I mean that our files need to be stored on another Server's filesystem.


Ok, if you go for one of the filesystem stores from Jorge's linked documentation above: Go to Control Panel / Configuration / System Settings / Foundation. In those settings (display all, not just the first 20) find the store that you're using and set the directory that it's supposed to use. The default for both "Advanced File System Store" and "Simple File System Store" is data/document_library, a directory relative to ${liferay.home}. You can easily specify an absolute directory, including fully addressed network shares.

If you want Liferay to move the data (and for example migrate from (simple) FileSystemStore to AdvancedFileSystemStore), go to Control Panel / Configuration / Server Administration / Data Migration and check the section under "Migrate documents from one repository to another.". In this migration you unfortunately can't configure the individual stores, so my recommendation is to first configure your target store through the configuration interface first, then use this migration tool. If you want to continue using the same store implementation, you'll either have to migrate twice due to the limitation of this tool or alternatively figure out the configuration format, shut down Liferay, move the files, configure Liferay through the configuration file option (it's a .cfg or .config file) and start it again. You'll need a restart anyway, because Liferay can't switch store implementations at runtime.
5年前 に Taruchit Goyal によって更新されました。

RE: Liferay 7 Documents and Media File Storage

Junior Member 投稿: 60 参加年月日: 18/03/16 最新の投稿
Hello All,

I have uploaded a document in documents and media, and version 1.0 got created.
Then created a webcontent, and link the document by pressing CTRL+L (I have enabled CKEditor).
Then, dropped the web content on the page and accessed the document, it was accessed properly.

Then, I uploaded the document with same title and changes in content 3 more times, thus, there are 4 versions of the document in documents and media.
However, at front end, the document accessed from the page is version 1.2

I went to the document in documents and media and tried to download version 1.4, latest document got saved in downloads folder.

However, when I took the URL of version 1.4, using GET URL, and entered it into browzer, the version 1.2 document got loaded.

I checked the latest version of document in db, it shows 1.4.

Thus, please suggest reason for the issue and solution for the same.