I Used file Upload component in perspective, after uploading in the same view, if I click on preview button it should show uploaded image .I tried passing
event.file.getBytes()
data to Image source, but I am getting error. How I can solve this issue. Thanks in advance
yes, onFileReceived event. I am assigning it to some param .When I use that param it will return byteArray ..I am not getting ,how to bind that value to Image viewer source
Standard python string interpolation (old school). (I still use it everywhere--the "C" style placeholders are much closer to java implementations than the .format() method's curly braces.)
I would use java's Base64 static methods to encode in the onFileReceived event, and assign the encoded form (which is a string) to the Perspective image property. As a string, it won't be garbled by Perspective.
That would crash your designer for large images. In runtime, it should be ok. Store them in globals, the trade back it to properly managed persistency and ideally delete images ones used or timeout cycle.
That's a terrible idea, as is, as that becomes a memory leak if you don't clean up after yourself very thoroughly. Such a bad idea that I created the viewVarMap() set of functions to hold java/jython objects in context, with automatic cleanup. It is part of my (free) Integration Toolkit module.
Yeah, no. That's the python standard library. Not recommended in jython for any technology that java already has. Put this in a project library script:
[quote="Tokyo_mht, post:16, topic:86757"]
This works ,Thanks .But it won't work for large MB if i assign it to view param. If I use global variable it will work.