import info.magnolia.module.dms.beans.Document

content = MgnlContext.getHierarchyManager("dms").getContent("/your/path");
Document doc = new Document(content);
doc.getFileSize()
doc.getMimeType() or doc.getFileExtension()

HTH,
Jan


On Aug 1, 2012, at 11:25 PM, Simon Goodchild wrote:

> Hi,
> 
> I'm am looking for a way to access the file size and type of objects that are 
> stored in the DMS repository. The use case is that I have a paragraph setup 
> to link to a DMS object, and want to display useful file information 
> automatically alongside the document link. I've looked through all the 
> documentation and APIs that I can find, but nothing seems to cover this 
> requirement (I have code for website repository objects, but this doesn't 
> work fro DMS). Is this possible, and if so does anybody have any example code 
> or pointers on which APIs to look at to achieve this?
> 
> For reference, I'm working with a Magnolia 4.1 system, but can switch to any 
> later version if that adds support for what I need.
> 
> Many thanks for any help you can give me,
> 
> Simon
> 
> 
> ----------------------------------------------------------------
> For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
> Alternatively, use our forums: http://forum.magnolia-cms.com/
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------




----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to