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

PDF Viewer and Image Uploaded

atul
Newbie

PDF Viewer and Image Uploaded

Hi

I want to know if widget is available for pdf viewer and any image uploader widget in Thingworx. If not how to do the same.

 

Regards

Atul Nirmalkar

Tags (1)
10 REPLIES 10

Re: PDF Viewer and Image Uploaded

You can upload any files from a client machine to Thingworx using the File Upload widget.

For viewing PDFs you can do it if your browser can show it, you can use a Webframe widget or open the PDF in a new Browser.

Not sure if this would fit your use case.

Re: PDF Viewer and Image Uploaded

Hi Chung ,

Thanks for reply.

I wanted to know like supp. i uploaded a pdf using file uploader widget and it got stored in ThinkworkStorage so how i can link it to webframe.

Same scenario in case of image,  i uploaded a image using file uploader widget and wanted to show the the image in image widget dynamically. As to image widget we can bind only media entity and i can't able find any sniplet to create a media entity in js. Can you help me in both cases.

1st Uploading pdf and dynamically showing in UI.

2nd Uploading image and dynamically showing in UI.


Regards

Atul Nirmalkar

Re: PDF Viewer and Image Uploaded

I am having the same issue!! Any help is greatly appreciated

Re: PDF Viewer and Image Uploaded

Thingworx File Repositories allow you to get a link to the file, just bind that to the Webframe widget or Image widget.

Re: PDF Viewer and Image Uploaded

Hi Pai…which method are you referring to? The only thing I see is ‘GetFileWithLinks’, but that returns an InfoTable.

Sorry, still new to TW. Thanks for your help!

Re: PDF Viewer and Image Uploaded

That is the service, that infotable that is returned shows all the files in the repository and an accompanying link to access the file.

Generally we use the concept of selected row to bind it to the webframe or image widget.

Or you must next filter the content to only return what you need.

As a rule, all services that are invoked by a user should be 'wrapped' services that leverage the base services the platform provides.

Re: PDF Viewer and Image Uploaded

The problem is if you bind a link or bind a link String to Image widget's SourceURL value, Image will still not show.because Image widget auto append "&__rnd=xxx" string  into image url. What's the problem!!!

QQ截图20160430222553.png

Re: PDF Viewer and Image Uploaded

Uploading image and dynamically showing in UI:

  • You can create a Datatable Thing with a image property inside, use AddDataStreamEntries service could upload images to each row of the entity
  • In the mashup, you could use a ValueDisplay widget, and bind the Image property to the widget, the image will show on the runtime, and if you have a Grid or List widget by the side binding to the same Data [GetDataTableEntries], you can control which image to present in the mashup.

Re: PDF Viewer and Image Uploaded

Hello Alexander,

I created a simple example of the "uploader" mashup. Sorry, I couldn't find how I can upload it here, so I put it in my Dropbox: https://www.dropbox.com/s/gy2fx891r1otgku/Mashups_Uploader.xml?dl=1

/ Constantine

Re: PDF Viewer and Image Uploaded

Hi Constantine. Do you still have this exceresice available so you could share it to me? I'm looking for a solution for this exact issue.

Announcements

Check out the upcoming Expert Session: Understanding ThingWorx Navigate Licensing in Community "Customer Events" section.