Foren

Document Library - Portable Format?

thumbnail
JohnnyBrew ., geändert vor 10 Jahren.

Document Library - Portable Format?

New Member Beiträge: 19 Beitrittsdatum: 11.07.09 Neueste Beiträge
Does anyone know how one might convert the Liferay "data/document_library" directory contents, along with its related metadata in the lportal schema, into a "portable" format? The document_library directory tree contents appear to be named per some sequence that correlates to primary keys in the database, and have no file extensions.

A couple correlating questions:

Which table(s) in the database identify the documents by those key values?
Are the documents on disk identical to the artifacts originally uploaded by end users, or have they been rewritten somehow? (i.g. can I simply rename these to their original names per their metadata)?

Any queries that join all supporting data per document (e.g. document library path(s), discussion forum thread referencing a document as attachment, etc.) would be helpful as well.
thumbnail
Samuel Kong, geändert vor 10 Jahren.

RE: Document Library - Portable Format?

Liferay Legend Beiträge: 1902 Beitrittsdatum: 10.03.08 Neueste Beiträge
Johnny,

You should not try to do this by hand (i.e., you cannot simply just rename the files).

1) Take a look at the dl.store.impl property in portal.properties.
2) Implement your own dl.store.impl class that names files according to your preference.
3) Change the dl.store.impl preference to point to your new implementation

If you haven't gone into production, that's all you have to do. However, if you have already gone into production and you need to migrate your existing data, it's going to be a lot more complicated. Take a look at portal-impl/src/com/liferay/portal/convert/ConvertDocumentLibrary.java to see how Liferay does it with it's built in dl.store.impl.
thumbnail
Vilmos Papp, geändert vor 10 Jahren.

RE: Document Library - Portable Format?

Liferay Master Beiträge: 529 Beitrittsdatum: 21.10.10 Neueste Beiträge
I would access it through WebDAV so it would show up as a directory structure with the files.