Hello, I have a BLOB file in my mysql database.
When reading, the line is a recor You can see it at the attachmend. Thanks |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 06.06.2017 at 09:44
Seen: 2,082 times
Last updated: 09.06.2017 at 05:16
Do your read the Record with the Database Step process element?
Yes the Record is the parameter. I would like to convert the object from the record into a file Type.
Object can be anything. What is the type of the Object returned by getField() at runtime? You can log that by the following code: ivy.log.info(in.Data.document.document.getField("File").getClass().toString()) If we know the type that is returned there we can find a solution to store the data to a file.
We save the file over the database process element as a blob with in.file.readBinary() Runtime log by using in.Data.document.document.getField("File").getClass().toString() give us: class ch.ivyteam.ivy.scripting.objects.Binary I tried this: File file = new File(in.data.document.document.getField("Name").toString()); file.writeBinary(in.Data.document.document.getField("File")); But I get the following error: Method writeBinary(Object) for class file of classloader org.eclipse.osgi.internal.loader.EquinoxClassLoader@44c54463[ch.ivyteam.ivy.scripting.objects:6.6.1.201705151238(id=84)] not found.