Issue
- How data flows in the database tables after uploading an image.
Environment
- Liferay 7.0
Resolution
- When the documents have been uploaded via document and media portlet from the Liferay portal, its metadata is saved in database tables with different entries and images are saved in folders with numeric allotted digits, which can be seen inside the data folder.
-
There are different tables that are associated with the document data, below are the details regarding database relations of Liferay 7 Document & Media
-
Dlfileentry
- It stores all document and media files data
- It has its parent folder information, created dates, modified dates, repositoryID, fileEntryTypeId.
- We can also store an external repository.
- When no external repository is used, then repositoryId will be groupId
- It also provides information of the size of the document, read count, an extension of the document, mime type. file entry id, smallimageid, largeimageid, customimageid, etc.
- Here, the title specifies the title of the document, whereas, name specifies folder of the document.
- The 'treePath' column has been added from Liferay 6.2 version, with this searching document hierarchy would become easier.
- This table consists of information about file association with Document Type
- Each file might be associated with a different Document type and relations will be maintained here.
- By default, Liferay documents are associated with a type called 'Basic'
- Liferay allows creating the custom document types by setting up with required fields.
- Custom document type information will be stored in this table.
- Updating any file in Liferay will lead to create a new version.
- Each version will be stored as an individual file in the file system
- This table maintains all versions of fileentry.
- Users can create a shortcut to file entry.
- It’s a logical link of a file, the file system doesn’t have this info.
- From lportal table, shortcuts would be pointed to the original fileEntry.
- This table maintains tile rank.
- Ranks can be defined from portal property (Max file rank version)
dl.file.rank.max.size=5
-
Dlfileentry