Skip to main content
10-Marble
February 21, 2024
Solved

Getting error "Message ::Invalid child path: Child path failed validation" while uploading file.

  • February 21, 2024
  • 1 reply
  • 6304 views

I have created a mashup which used the file upload widget to display an image using the image widget, i have created a service, which takes parameters from the file upload widget and then supplies the result to the image widget which is an image link.

 

Best answer by nmilleson

Correct.  You can either copy that link format and put it together with string concatenation, or you can programatically call that GetFileListingWithLinks service to get the correct URL for that image.

 

-- Nick

1 reply

17-Peridot
February 21, 2024

@AV_10867476 ,

 

It's not necessary to create the media entity to show your image in an image widget.  You can create your url like this:

/Thingworx/FileRepositories/<path to image>/myImage.png

 

Bind that relative url to your image widget and it should show it.

 

- Nick

 

10-Marble
February 21, 2024

Thanks for the response Nick, so as i understand the path has to be changed like you have mentioned  so i directly assigned the result

17-Peridot
February 21, 2024

It looks like 1.1.png is in the path twice.  It will look something like this:

/Thingworx/FileRepositories/MyFileRepository/1.1.png

 

Did you create a new Repository Thing to put your images in or are they going in the System Repository?

 

I would suggest navigating to the File Repository thing and running the service GetFileListingWithLinks.  That will give you the correct url format.