I am using Magnolia 4.5.9 along with STK 2.0.10
I am trying to create an InputStream from an Asset.
In my example, I have a node that have a PDF asset. I want to create an
InputStream to then create a file.
[code]Asset asset = stkTemplatingFunctions.getAsset(event, "pdf");
if (asset != null){
InternalAsset intAsset = (InternalAsset) asset;
NodeData node = intAsset.getBinaryNodeData();
node.getStream();
}[/code]
A few issues here:
- I cast to InternalAsset, which will potentially break
- The type NodeData is deprecated
I looked at the family:
- info.magnolia.module.templatingkit.dam.Asset
- info.magnolia.module.templatingkit.dam.assets.AssetWrapper
- info.magnolia.module.templatingkit.dam.assets.InternalAsset
Could not figure out a good way to do this. Please indicate a "good" way to do
this.
Thanks in advance
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=1f484c58-604b-4b08-86f6-947080d7e2a8
----------------------------------------------------------------
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]>
----------------------------------------------------------------