[opencms-dev] File path in opencms

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


Hi,

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,
response);
CmsObject cmso = cms.getCmsObject();
CmsFile cmsFile= cmso.readFile("/login/download.jpg");
byte[] contents=cmsFile.getContents();

You can then write the byte array to FileOutputStream.



-----
Cheers,
Kiran
--
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