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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Sending Image from Repository (not download Link) to SharePoint List

HD_10225728
6-Contributor

Sending Image from Repository (not download Link) to SharePoint List

Hello everyone,

 

we want to send images saved in a ThingWorx Repository to a SharePoint list. The service in itself works, however we have only achieved to send download links of the images (by using the service GetFileListingsWithLinks, column downloadLink), but not the image itself. 

 

HD_10225728_0-1658240419298.png

We were wondering if it is possible to generate a link that doesn't automatically download the image, when the link is pasted in the browser? Has anyone ever achieved this? Is this technically even possible? 

 

Thank you so much!

7 REPLIES 7
PaiChung
22-Sapphire I
(To:HD_10225728)

The click on link being an automated download, is browser behavior I believe.

If you are trying to send the actual image, you might be able to use 'LoadImage' and potentially send that to Sharepoint?

HD_10225728
6-Contributor
(To:PaiChung)

Thank you for the reply. We are using JSON.stringify to send the data to SharePoint, so sending the image itself is as far as I know not possible.

PaiChung
22-Sapphire I
(To:HD_10225728)

Would your sharepoint page allow for a 'display' image based on link on the page?

I'm not an expert in sharepoint so I am not sure if it can be used like a 'webpage' and show image based on url.

HD_10225728
6-Contributor
(To:PaiChung)

Hello, I have also tried this, normally SharePoint can display images based on URL, but it cannot display the ThingWorx Image URLs, most certainly because they are download links.

PaiChung
22-Sapphire I
(To:HD_10225728)

Looks like it is indeed not possible, since those files are not in the 'online' environment.

If you are 'in session' you could do: <server>:<port>/Thingworx/MediaEntities/AcknowledgeAlertIcon

So put your images in as Media Entities and display those links.

HD_10225728
6-Contributor
(To:PaiChung)

Hello, thanks for the reply! But wouldn't sending the (probably also download) link of a media entity vs. sending the download link of a repository entry not make any difference?

 

The problem is also that to open the download link, one needs to have access to ThingWorx platform, since the images remain in the ThingWorx environment.

PaiChung
22-Sapphire I
(To:HD_10225728)

Yes access unfortunately is required for each.

Announcements


Top Tags