web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Some files in SharePoi...
Power Automate
Unanswered

Some files in SharePoint download instead of open when clicking on link

(0) ShareShare
ReportReport
Posted on by 12

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.

ChrisV3_0-1695044352811.png

 

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.

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at

    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:

    https://techcommunity.microsoft.com/t5/sharepoint-developer/get-the-preview-url-in-sharepoint-document-library-via-rest-api/m-p/3866940

     

    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}'])

     

    concat_expression.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard