
Announcements
Hi there,
I'm having a bit of trouble with my flow. At a high level, my flow is triggered when an HTTP request is received, then it uses the "Get files (properties only)" action to grab some files in SharePoint, then I create an HTTP response where I return a link to the file amongst other things.
This is the link that I am returning in the response.
This link is meant to open the file in SharePoint and it generally does so, however I've noticed that it sometimes does not, and instead immediately begins downloading the file when you click on the link. This appears to be the case for all .tif files.
I want this link to always open the file in SharePoint, no matter the file type. I tried appending "?web=1" to the end of the link, but it does not have any effect. Can someone explain why this 'Link to item' functions differently for .tif files versus other files? And how can I force the .tif files to open in SharePoint in the browser instead of immediately downloading? Thank you.
Hi @ChrisV3,
That link will be a direct link to your file. With those type of files it depends on your browser how it handles it.
Microsoft does have a preview feature, but that requires a different type of link format. In this thread that format is shared:
Below is an example with a Select action
concat(actions('Get_files_(properties_only)')['inputs']['parameters']['dataset'], '/', variables('LibraryName'), '/Forms/AllItems.aspx?id=', encodeuricomponent(concat('/sites', last(split(actions('Get_files_(properties_only)')['inputs']['parameters']['dataset'], '/sites')))), '/', item()['{FullPath}'], '&parent=', encodeuricomponent(concat('/sites', last(split(actions('Get_files_(properties_only)')['inputs']['parameters']['dataset'], '/sites')))), '/', item()['{Path}'])