[xwiki-users] Limiting number of attachments for page
My xwiki is open for registering anyone, as it needs to be. Lately I have been seeing non-genuine users attaching useless, even illegal documents and images to their profile pages (some kind of drug trade racket I suspect). So, I want to: 1) restrict number of attachments to Profile page to only 1 or 2. 2) have separate inventory of images to be used in whole wiki (like Wikipedia), thereby disallowing attachments to any other page Help appreciated..
Hi WikiNote,
On 18 Feb 2017, at 04:07, WikiNote Org <[email protected]> wrote:
My xwiki is open for registering anyone, as it needs to be. Lately I have been seeing non-genuine users attaching useless, even illegal documents and images to their profile pages (some kind of drug trade racket I suspect). So, I want to: 1) restrict number of attachments to Profile page to only 1 or 2. 2) have separate inventory of images to be used in whole wiki (like Wikipedia), thereby disallowing attachments to any other page
So basically a way to control on which pages (taking nested pages into account) attachments can be added and a way to control the # of attachments for a given page (taking nested pages into account). For the inventory idea, the only downside I can see is that you’d need to be careful not to have too many attachments on a single page since this could lead to memory issues when loading the page. Generally speaking this looks like a good idea and I’d suggest that you create a jira issue for tracking this idea. Right now the feature you ask doesn’t exist out of the box. But as with everything in XWiki, with a bit of coding it’s possible :) Technically speaking, this means modifying the UploadAction.java class and checking for config parameters in there. The nice thing (but not mandatory) would be to reimplement UploadAction which is coded using some old technology with a newer EnityResourceAction (see http://extensions.xwiki.org/xwiki/bin/view/Extension/Resource+API#HAddingane...). Thanks -Vincent
Help appreciated..
Thanks Vincent. I am seriously thinking to switch over to inventory concept. But as you said, it would create memory issues. So how about having a different approach like having inventories based on categories. Could you suggest me what total memory size of attachments might be ideal for any page to load effectively? Just approximate figure would work for me. -- View this message in context: http://xwiki.475771.n2.nabble.com/Limiting-number-of-attachments-for-page-tp... Sent from the XWiki- Users mailing list archive at Nabble.com.
participants (3)
-
Vincent Massol -
Vishal -
WikiNote Org