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

Raki 486 Reputation points
2022-01-23T22:08:29.38+00:00

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

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Allen Xu_MSFT 13,866 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.png

    After 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.

    1 person found this answer helpful.

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.