[opencms-dev] File path in opencms

kiran g kiran.blgt at gmail.com
Mon Jul 18 11:33:23 CEST 2016


If you need the contents of the file, you can get it in a byte array using
something like the following:

CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
CmsObject cmso = cms.getCmsObject();
CmsFile cmsFile= cmso.readFile("/login/download.jpg");
byte[] contents=cmsFile.getContents();

You can then write the byte array to FileOutputStream.

View this message in context: http://opencms.996256.n3.nabble.com/File-path-in-opencms-tp26357p26358.html
Sent from the OpenCMS mailing list archive at Nabble.com.

More information about the opencms-dev mailing list