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

Is there a way to load HTML files in File Repository and add a link widget to display them?

Level 5

Is there a way to load HTML files in File Repository and add a link widget to display them?

I've loaded all the files to support an html help file in a File Repository.  When I reference them via a link widget with the following path:

https://<<localhost>>/Thingworx/FileRepositories/File_Repo/Help/index.html

it downloads the index file and it doesn't seem to recognize all the other files in the folder to add images, content, formatting, etc.  Any ideas?

10 REPLIES

Re: Is there a way to load HTML files in File Repository and add a link widget to display them?

I have same problem, anyone can help on that?

How to open html pages from service, widget or any other resource?

Hi,

 

I have some html pages which I would like to open from a mashup using the link widget or a service and a button, any way it works for me is fine. The pages are stored on the Thingworx repository. The maximum I could do using the link widget, thingworx try to download the page instead of open it.

 

Thanks!

Re: Is there a way to load HTML files in File Repository and add a link widget to display them?

Hello,

 

The way the repository works is, that it's pre-configured by default to not execute the files within it, rather treat them as pure binary, downloading the file that was uploaded (html is simply considered a binary file and download is the default). This is a good practice and shouldn't be changed for various security reasons. As a alternative, you could put all necessary files to display a help Website in a archive, let the user download and extract it in a folder and view the help document from the index.html which will behave as expected. You could put the instructions in a label on the same mashup if necessary.

 

Let me know if you have any questions.

 

Regards,

Pascal

Re: Is there a way to load HTML files in File Repository and add a link widget to display them?

There’s a dirty trick,

 

You can use an Html TextArea widget and FileRepository thing LoadText service, you set with LoadText path parameter with your html file and bind Content result to the TextArea text property.

 

Of course, links to other FileRepository files won’t work, if you want to show images, you can set it wilt the full file repository path for the file, something like: /Thingworx/FileRepositories/[yourFileRepositoryThing]/[yourImageFilePathAndName]

 

Regards,

Carles.

Re: Is there a way to load HTML files in File Repository and add a link widget to display them?

@rflanagan

 

Hope you are doing good. Could you please confirm if the issue has been resolved.

 

If yes, please mark the answer as accept as solution for the future reference. Thank you in advance.

Regards-Mohit Goel

Re: Is there a way to load HTML files in File Repository and add a link widget to display them?

@CarlesColl,

 

There is an even better way -- use the WebFrame widget and pass in the link to the HTML as the URL parameter.

Re: Is there a way to load HTML files in File Repository and add a link widget to display them?

It just work if you have the URL in internet, not for HTML files in repository.

 

Thanks!

Re: Is there a way to load HTML files in File Repository and add a link widget to display them?

@Duartefe,

 

I was testing this, because I have done exactly this in the past, and I have it working on ThingWorx 8.3.0-b349, but I also am able to view the HTML by going to the link directly so I am not sure what may be going on. 

 

example1.pngexample2.pngexample3.png

Re: Is there a way to load HTML files in File Repository and add a link widget to display them?

@jamesm1,

 

I am not sure if I understood but it seems that you are using a internet URL. I want to use a file in repository, for example: C:\ThingworxStorage\Repository\file.html instead of http://... because I do not have that html file anywhere, just on repository.

 

Thanks!