0

I want to create an extension that prevents Office documents download and instead opens them in Office Online. Do browsers (preferably Chrome and Edge) have such API and what code do I need to write to implement my idea?

Kenya-West
  • 392
  • 2
  • 18

2 Answers2

0

If we talk about Edge then we cannot stop the file from getting download.

If you have the direct link of file then you can directly open it using Office Online.

You can try to store your Office files on OneDrive. Then you can open it via Office Online.

There is an extension available which supports both Chrome and Edge for the same purpose.

If you store the file in OneDrive then it can open the documents in Office online.

But, It cannot stop the Office files from getting download.

Quick access to your Office files in the browser

I did not get any code example to develop the extension that can prevent the user from downloading the Office file and open it in Office Online.

Deepak-MSFT
  • 10,379
  • 1
  • 12
  • 19
0

For chrome (although Edge is supposed to support chrome APIs but I've not tested) please check a potential solution at https://browserextensionresources.blogspot.com/2018/09/intercepting-file-download-in-chrome.html