How to force to download files instead opening in the browser?

Hello,
We have a external SP online facing site, where external user can upload documents into library but We don't want to allow them to edit file in the browser rather they will need to download file locally to edit and then upload again. Is it possible to achieve creating custom permission level or some custom code?

Thanks in advance

SharePoint

A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.

10,607 questions Sign in to follow 0 comments No comments Report a concern I have the same question I have the same question 0 votes Add comment

1 answer

Sort by: Most helpful Most helpful Newest Oldest

Allen Xu_MSFT 13,821 Reputation points 2022-01-24T07:34:21.353+00:00

Hi @Raki , In your case, It is recommended to set Default open behavior for browser-enabled documents to Open in the client application. Go to Library settings > Advanced Settings, you will find the option under the "Opening Documents in the Browser" section.
167620-image.pngAfter then, when users click the file in the library, a prompt message which instruct them to open the file in the client application will appear.
167650-image.png
The document will be opened in the client application as read-only mode. They cannot save the file with the same name directly to the SharePoint Online library and have to save the document with a new name or save to local and upload again. ---------- If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

3 comments Show comments for this answer Report a concern Raki 481 Reputation points 2022-01-24T17:49:19.727+00:00

Thanks for your reply. i think the point you mentioned documents will be open read only mode that works only when you are in classic experience not modern. in modern if i click on the document, directly opening with client application and can edit them and automatically saving into SharePoint. Thanks

0 votes Report a concern

Allen Xu_MSFT 13,821 Reputation points 2022-01-27T07:06:48.05+00:00

If you are using Office Microsoft 365 subscription(I tested based on Office 2016), yes, it is the situation. I'm afraid there is no OOTB way to force to download files instead opening in the browser.

0 votes Report a concern Christophe Huysecom 5 Reputation points 2023-08-21T08:01:15.07+00:00

This does not help for me : opening docs in app instead of browser does not open them in read only mode. I can still edit the docs and save them : changes are then saved in sharepoint instead of locally.