pimezone
pimezone

Reputation: 103

liferay process files which are uploaded

I'm new to Liferay, and I need to create hook which will intercept file and process it before save to the filesystem. Is it possible to do with hooks or I need to make ext?

Upvotes: 1

Views: 146

Answers (1)

Olaf Kock
Olaf Kock

Reputation: 48057

I'd expect this to work in a hook. Create a hook that intercepts DLFileEntryLocalService, e.g. addFileEntry. Do your job in that method and if you want to approve this to be added to the database, call super.addFileEntry(...) which will take care of the default behaviour.

You'll have to identify if there are more methods that can add a document to the library.

Upvotes: 1

Related Questions