Forum Discussion
Links to SPO always open in browser - I need native app by default
- Oct 07, 2022The short answer is, you cannot. Specially since it seems you're trying to link .dmg files. Unless these apps have support for talking to SharePoint directly to edit files, which I'm not aware of them having that you're only option is utilizing OneDrive sync clients and Modifying files direct that way.
Or what we have done in the past with files like this is utilize a tool such as ZeeDrive to create "Network Drives" to the dmg files etc. And others could share file links like you have in your example to locations they have access to in ZeeDrive.
If the app you have can open SharePoint dmg files directly from the open menu some how, then you might be able to finagle something with a URL shortener etc. to allow the different URL formats to tell the OS to open the file, but that's assuming those can open a web link to edit files that way, which not many 3rd party apps do.
Anyway, I know it's not the answer you were hoping for but working with 3rd party file types is a bit tricky vs. office files.
It's OneDrive sync and ZeeDrive for us and works ok.
1. May not be exactly what you are looking for, but you can use Office URI Schemes to share the links to documents which will open office documents in desktop app. For example, below link will open the excel file in desktop app:
ms-excel:ofv|u|https://contoso/Q4/budget.xls
Where "https://contoso/Q4/budget.xls" is the URL of your excel file. You can find other URI schemes in above documentation.
2. Non office documents will not open in browser or respective desktop apps - this is a default behavior in SharePoint.
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- romanbrunOct 07, 2022Copper Contributor
Thanks for your reply.
1. I found them aswell. But didn't get further how to add the uri-scheme-prefix by default. Would I need to adapt a registry entry? And is this only a possible solution for Office documents, but e.g. not PDF or other files (as far as I found out)?
2. When I have a none-office file stored within a SPO and share a link to this file, it generates me a link like https://contoso.sharepoint.com/:w:/r/sites/SP1/Shared%20-Documents/General/Folder1/sampleFile.dmg
And yes, tries to opens it within a browser. And then asks me to download that file. What leads to duplication.
What I want is, that the file direct opens the corresponding desktop app. So, the same behaviour as if I would have stored the file on a file server, e.g. R:\Folder1\sampleFile.dmg .
- ganeshsanapOct 07, 2022MVP
romanbrun For office documents, you can use URI schemes while sharing the document links (whether you are sharing via email or adding links on any site).
For non-office files: try adding ?Web=1 at the end of URL and see if it works for you. File URL format:
https://contoso.sharepoint.com/sites/siteName/Shared%20Documents/Document.docx?Web=1
OR you have to share the file URLs in this format:
https://contoso.sharepoint.com/sites/siteName/Shared Documents/Forms/AllItems.aspx?id=/sites/siteName/Shared Documents/MyImage.png&parent=/sites/siteName/Shared Documents
Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.
- romanbrunOct 07, 2022Copper Contributor
With "you can use URI schemes while sharing the document links" I assume you mean, that i add this manually, correct? This wouldn't work for our end-users... I need a solution where it is added by default.
Adding ?Web=1 still adds within the browser
Changing the URL from:
https://contoso.sharepoint.com/:x:/r/sites/sp1/Freigegebene%20Dokumente/General/sample.xlsx?d=w1fef9a8994034f7234adsf05db45e05&csf=1&web=1&e=ora7Ef
to:
https://contoso.sharepoint.com/:x:/r/sites/sp1/Freigegebene Dokumente/Forms/AllItems.aspx?id=sites/sp1/Freigegebene Dokumente/General/sample.xlsx&parent=sites/sp1/Freigegebene Dokumente
Leads to the message saying "element not found"