cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Thingworx 8.5.4 not able to import svg-xml media entity (Error: invalid length)

IoT_Fynn
6-Contributor

Thingworx 8.5.4 not able to import svg-xml media entity (Error: invalid length)

Hey, I am trying to import an SVG Image into ThingWorx 8.5.4-b222.

Unfortunately I am getting following error message:

"Import failed: invalid length"

 

Can someone help?

 

Cheers Fynn

 

1 ACCEPTED SOLUTION

Accepted Solutions
cmorfin
19-Tanzanite
(To:IoT_Fynn)

Hi @IoT_Fynn 

 

Yes it appears the way to upload svg is via dynamic content as you did.
If you check the Help Center Media page, it indicates 
"Locally-stored media entities support JPEG, PNG, and BMP image types. To use other file types, refer to them as dynamic content and modify the supportedMediaEntityContentTypes parameter in the platform-settings.json file to include the desired MIME-type."

I think that follows the behaviour you are seeing.

 

Regards

Christophe

View solution in original post

5 REPLIES 5
slangley
23-Emerald II
(To:IoT_Fynn)

Hi @IoT_Fynn.

 

Can you please provide the image so I can test it?

 

Regards.

 

--Sharon

IoT_Fynn
6-Contributor
(To:slangley)

 Hey Sharon,

thank you for your quick reply! I put the Image in the appendix. But it did not work with any svg that I tried so far.

 

Regards

Fynn

cmorfin
19-Tanzanite
(To:IoT_Fynn)

Hi @IoT_Fynn 

 

I am not sure how you are importing your svg file but if that is via a Media entity, currently ThingWorx does not allow it.

I'd recommend voting for this ThingWorx idea to give it more weight to be taken into considerations for future release.

 

Christophe

IoT_Fynn
6-Contributor
(To:cmorfin)

Oh okay. Yes i am doing it via Media entiy. There are strong hints, that you can import and svg file in TW 8.5. At least i tought so. If you have a look at the 8.5 platform-settings.json you can see this line:


"supportedMediaEntityContentTypes": [
          "image/svg+xml"

So are you sure that svg is not supported in ThingWorx 8.5?

There is a workaround. I can give the Media entity the URL of an SVG image. But for that I have to upload the svg image to my repository so I would rather use the "normal" way and upload it.

cmorfin
19-Tanzanite
(To:IoT_Fynn)

Hi @IoT_Fynn 

 

Yes it appears the way to upload svg is via dynamic content as you did.
If you check the Help Center Media page, it indicates 
"Locally-stored media entities support JPEG, PNG, and BMP image types. To use other file types, refer to them as dynamic content and modify the supportedMediaEntityContentTypes parameter in the platform-settings.json file to include the desired MIME-type."

I think that follows the behaviour you are seeing.

 

Regards

Christophe

Top Tags