Can I create a browser extension that prevents download of specific file types and forwards user to a link? - browser

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?

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.

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

Related

bulk download files from microsoft sharepoint

bulk download from share point not downloading exact files and error.txt files are generated.
is there any application to bulk download sharepoint files
https://i.stack.imgur.com/cnOyy.png
https://i.stack.imgur.com/X5wf2.png
You can use the Open with Explorer function to open the document library in Windows Explorer, where you can select all the files you want and simply copy them to your destination. Note that this function only works in Internet Explorer, not in Edge or any other browser. There are ways to make it kind of work in modern browsers, but that requires custom code. You can, however, save the location of the document library to the Quick access list to make it easier to find.
Another option seems to be the SharePoint Bulk File Download web part, but I believe this is a paid tool that must be purchased after the trial.
I use Open with Explorer all the time, but I have never tried the mentioned web part.

Embed Excel in a website to edit a locally stored document

Is it possible to embed google excel in my website to edit document stored locally?
My manager asked me if it is possible to integrate the Microsoft office webapp in my own website.
Clients have excel files stored on our website, we want to know if it is possible for them to open the file with a web excel page, edit the file and save the modifications. For now, they use SharePoint so it is easy for them but we intend to use an other platform.
Our client can have all the license we need.
I searched but I didn't find any solution.
I know you should be able to do this with ASP and the .Net Framework. SharePoint uses ASP pages, so you may try to do something simpler.
If you go over the Internet you'll see several solutions because people do this too.
e.g. a thing you can do is to use Open XML API to do this, and it is like reading / modifying a flat file on the server. A restriction is it has to be .xlsx / 2007 format onward.

Mimic Sharepoint edit Office file download

When you browse a list of files in Sharepoint using IE and attempt to download the file, you get the option of opening it in read-only or edit mode. When you open the document, Office knows that the file exists in Sharepoint so when you save, it is updated in Sharepoint without the user having to re-upload the file.
I'd like to have this same functionality in a custom website. I have access to Sharepoint and the file list so I'm using the same URL that Sharepoint is to download the file but there's something else happening in Sharepoint that tells the computer to not download a copy of the file but to open it in Office from the Sharepoint URL.
Does anyone know how to mimic this same behavior so I can get a file to be opened in Office from Sharepoint to it can save directly back to Sharepoint?
The special thing about this, is the link:
It's not just http://example.com/document.docx . It's ms-word:ofe|u|http://example.com/document.docx .
Just add ms-word:ofe|u| in front of the link for letting the browser know to open the link with an other Application.
There are other strings for other links.
Open a OneNote-File with:
onenote:http://example.com/document.one
And Excel-Files with
ms-excel:ofv|u|http://example.com/document.xlsx
And just for fun a TeamSpeak Link:
ts3server://example.com
Create URL for MS Office 2010 (and higher) to:
open document in view mode:
ms-excel:ofv|u|http://server.com/path/filename.xlsx
open document in edit mode:
ms-excel:ofe|u|http://server.com/path/filename.xlsx
List of MS Office apps URL scheme names:
ms-word:
ms-powerpoint:
ms-excel:
ms-visio:
ms-access:
ms-project:
ms-publisher:
ms-spd:
ms-infopath:
MS has a good page with explanation:
MS Office Dev Center > Office URI Schemes

Direct editing of Microsoft Office files on the server (Plone)

Is the following behavior possible (using some features of Microsoft Office not very well known by a Linux guy)
Upload Microsoft Excel (or some other office file in Plone) as File content type
Save
When you click the file next time it opens directly in Microsoft Excel
When pressing Save in Excel it directly updates the file on the server, not the local temporary copy
I think Microsoft Office provides some APIs to do things like this but I have no idea how they work. Some Webdav URLs maybe?
Enabling external editing and using Zope External Editor Client (PYPI) should to do just that (for Archetype -based content types), but it must be installed on all client machines and may have issues. The development version should also support Dexterity-based content types.

Is there a library that takes Microsoft Office files (Word/Excel/ppt) and renders images of them?

I'm building a webapp, and I need the ability for users to view Word/Excel/PPT files in the browser (these files are stored server-side). This is to offer them a quick way to preview the document without needing to download it and launch Microsoft Office.
Pretty much looking for the "View" feature for email attachments in Gmail. I'm assuming that Google is somehow rendering the doc formats into images and displaying them in the browser.
Is there a way to do this in OpenOffice?
I do not know whether you can do this with OpenOffice, but SpreadsheetGear for .NET will let you open an Excel workbook and get an image from ranges of cells or charts.
You can see some examples of this here.
Disclaimer: I own SpreadsheetGear LLC
Here is a way to do generate images of office files, doing all of the processing on your server:
On server-side, run OpenOffice in server mode (no UI, just the API is callable).
Call the OpenOffice API to translate any office file to PDF (See how the open source software Alfresco does this).
Then convert PDF to PNG using ImageMagick.

Resources