掲示板

Check file size against Document Library size when uploading user's file

thumbnail
13年前 に Darth Lord によって更新されました。

Check file size against Document Library size when uploading user's file

New Member 投稿: 8 参加年月日: 10/05/21 最新の投稿
Hi,

This is my first time posting here and would try to be as detailed as possible.emoticon

Here is my current configuration:

  • Liferay 6.0.5
  • Database: MySQL
  • Solr search for ducument search
  • OS. Windows 7 Pro
  • IDE: NetBeans 7.0 Beta
  • SDK: NetBeans Portal Pack 3.0.4


I am try to implement a funtionality that will allow me to set user's document library size depending on the user's role. As follow:

Users belonging to the Marketing deparment can have 10Gb space
Users belonging to the Finance department can have upto 2Gb space, etc...

Liferay tables already records the size of each document for a user and companies. I want to be able check the user document size and make sure that it doesn't go over his allowed limit.

I am trying to override "edit_file_entry.jsp" in /html/portlet/document_library/ as this is the JSP which uploads files to the Document Library. I have been going through the JSP but I am not sure where exactly I can make the necessary changes in the file to retrieve the current size of the user and or company Document Library size and compare it with the current file being uploaded.

I can write my own portlet to provide the same functionality but I was thinking of re-using current code and amend as required.

Thanks
thumbnail
13年前 に Samuel Kong によって更新されました。

RE: Check file size against Document Library size when uploading user'

Liferay Legend 投稿: 1902 参加年月日: 08/03/10 最新の投稿
Take a look at the Wrapper Plugins wiki page.

Use a wrapper to override the add, delete and update methods in com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService

You'll need to create your own method of tracking how much space a user has used, but you should do the check in DLFileEntryLocalService.
thumbnail
12年前 に Darth Lord によって更新されました。

RE: Check file size against Document Library size when uploading user'

New Member 投稿: 8 参加年月日: 10/05/21 最新の投稿
for your reply and sorry for the delay. I will look into it.
thumbnail
12年前 に Darth Lord によって更新されました。

RE: Check file size against Document Library size when uploading user'

New Member 投稿: 8 参加年月日: 10/05/21 最新の投稿
for your reply and sorry for the delay. I will look into it.