Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
Started developing extension to get image file from windows file explorer.
Here how to convert Imge file to thingworx IMAGE basetype?
Solved! Go to Solution.
Got solution with by converting image file into Base64 String.
String base64String = null;
File imageFile = new File(imagePath);
byte[] fileContent = FileUtils.readFileToByteArray(imageFile);
String encodedString = Base64.getEncoder().encodeToString(fileContent);
base64String = encodedString;
Hi,
Following link may be helpfull
How-to-load-the-image-into-thingworx-storage-media-dynamically
Hope this helps!!
Got solution with by converting image file into Base64 String.
String base64String = null;
File imageFile = new File(imagePath);
byte[] fileContent = FileUtils.readFileToByteArray(imageFile);
String encodedString = Base64.getEncoder().encodeToString(fileContent);
base64String = encodedString;