On 03/25/2010 12:15 AM, Milind Kamble wrote:
> Hi. I couldn't find the user interface to delete older version of any given 
> attachment. This would be useful when the attachment size is substantially 
> large such as a video clip for which typically only the recent version is 
> relevant and not the older ones. At the same time I am not looking for the 
> option that would prevent versioning of attachments across the board, because 
> for attachments such as powerpoint data, we need to be able to retrieve 
> previous versions for analysis.

This requires programming rights:

#set($avs = $xwiki.getXWiki().getAttachmentVersioningStore())
## Now $avs is of type com.xpn.xwiki.store.AttachmentVersioningStore
#set($att = $doc.getAttachment('movie.flv').getAttachment())
$avs.deleteArchive($att, $context.context, true)

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
users mailing list
users@xwiki.org
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to