A.C
A.C

Reputation: 197

import Web Content into Liferay Database

I want to keep web content in liferay database. Currently the JPGs are in another filesystem on another server, which I want to move to liferay database. Is there a way to bulk import these JPGs/web content to liferay db? One option I'm thinking is having a daily scheduled job to import new files from the filesystem. Curious to hear if anyone else has done it and how?

I found that there is a thing called as Database Hook. But as far as I understand, this lets you save to db only those files which you upload through the Image Gallery in Liferay. Which is a bit different from having to import files from another filesystem programmatically.

Upvotes: 1

Views: 1695

Answers (1)

Olaf Kock
Olaf Kock

Reputation: 48087

When you go to Liferay's Document Library (or image gallery in 6.0) you'll find a link "Access from Desktop" in every folder. This can be used to connect via WebDAV, so you can connect to Liferay's Document Library as if it was a Network share. Then just copy through batch files or explorer (drag&drop) and they'll end up in the doclib. Works in both directions.

For Liferay 6.1 you can also consider Liferay Sync, a Dropbox-like client that just synchronizes the document library with a folder on a local (remote from the server) system.

And the most complex variant (just to be complete here) is to use Liferay's API to insert documents programmatically. The advandage here is that you can also use it to tag and categorize the content during your import process, but it definitely is more work than just dragging and dropping files.

Upvotes: 5

Related Questions