-
Notifications
You must be signed in to change notification settings - Fork 274
Labels
Description
Describe the Bug
The current implementation of createAsset uses a string variables in hopes to determine the image type.
When it comes to raw base64 images, this check fails.
You can't take a base64 encoded valid image string and use it with createAsset
To Reproduce
In a macro, do this:
[h: testB64 ="iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+XnWQAAAAASUVORK5CYII="]
[r: asset = createAsset("baselineTest", testB64)]
This error is returned:
java.lang.NullPointerException: Cannot invoke "String.equalsIgnoreCase(String)" because the return value of "java.net.URI.getScheme()" is null error executing expression asset = createAsset("baselineTest", testB64).
Expected Behaviour
I should be able to take any valid base64 image and use it with createAsset.
Screenshots
No response
MapTool Info
1.18.6
Desktop
Win 11
Additional Context
No response