I'm working on web application that deals with files of different kinds and stores it's metadata (e. g. if it is Microsoft Word file, then I try to parse it, if JPEG - EXIF, and so on).
General workflow: the user selects a file stored in a database, presses check out file, then default user editor / viewer (e. g. for PSD - Adobe Photoshop) will be opened on user's PC. When user finishes working on file, she presses check in and web application uploads file for further post-processing.
Right know this workflow implemented using Mozilla Firefox AddOn SDK (particularly sdk/io/file and OS.File methods): web application interacts with an extension for downloading / uploading file. So my application is tied to Firefox. But guys from Mozilla is working on WebExtensions API and I'm afraid in future they will deprecate AddOn SDK at all. Unfortunately, WebExtensions API doesn't provide functions for interacting with a file system.
So my question is: is there any other ways to interact with file system from web application? May be WebAssembly will provide such capabilities (bad luck, due lack of documentation, I can not find any sensible information about it)? Anyway I want to write application that will be compatible with major browsers, so I don't want to deal with extensions / addons anymore.
Related
I have a SharePoint 2019 document library wherein I have a custom JavaScript code to open the MS documents (Word, Excel, Ppt, Visio) in the client application. I am using Office URI schemes for opening the documents in client apps. However, if there is no client application installed on the computer, the Office URI scheme fails without throwing up any error. I want to know if there is a way to check from the browser (IE and Chrome) if a particular MS application (Visio, Word, etc.) is installed on the computer.
P.S. I have tried the ActiveXObject approach, but for some reason, it didn't work for me and, also I want a solution that will be cross-browser compatible and afaik ActiveXObject is supported only on IE.
(Current MSFT employee in Office here. On the team that owns the link invocation handling for the native client side but not the SharePoint or JS side)
The root problem is that the browser object model doesn't give you a result for navigating to the ms-word/etc links. As I understand it that is why the built-in SharePoint open UX has 2 options. One to open in the browser and another to open in the native client. And there is interstitial UX to prompt the user if the file did not successfully open in the native client.
(And, correct, the ActiveX solution will not work even with modern Edge on windows either and is a dead-end technology wise.)
You can try using ActiveX technology to instantiate Office application as described on the detect microsoft office version using javascript thread. But Chrome is not aware of COM technology. So, any code for creating an Office application instance will fail.
I'm looking for leads on how to capture web page metadata from the current browser page. I want to create a feature in my application that will allow the user to press a hot key and record meta data from the web page currently open in the user's browser. My application will be running minimized, this feature is to be activated by a global hot key.
I'm using nw.js (formerly Node-Webkit) to create this application, so ideally, the solution would be javascript running in a desktop installation of Node.js. If this is not practical, I understand that I can call platform specific code from nw.js, so solutions developed in any desktop os language would be of interest.
My application targets OS X and Windows.
I'm hoping to capture metadata from all major modern browsers (Chrome, Firefox, Safari and IE 10+).
At a minimum I need to capture the page url, but I also want to capture Keywords, Description and highlighted text for the source web page.
I need to implement this function without modifying the source webpage in any way, and I prefer to avoid the need for browser extensions, bookmarklets or plugins.
If a solution exists using a remote controlled browser extension (no user interaction) that would be of interest, but ideally I want to avoid requiring the end user to install or interact with anything but my application.
My search to date has located no information on reading web page information from applications outside the browser.
Any thoughts or leads are much appreciated.
I have my first brand new google chrome extension, which I'd like to upload to the chrome web store. The thing is that my extension is using native messaging via stdio to a c++ exe. The extension also required a registry key to be installed.
Is it possible to upload the required files to the chrome web store (including exe and dll dependency)? Is there a way to automate the installation of the registry key (required to send messages from chrome extension js to exe), and register dll?
The idea behind chrome-extensions (and native messaging) is to limit the giant security hole that is NPAPI: to create a divide between the browser and the desktop that runs it. For this reason, you'll need to perform two separate installations: one for the extension and another for the native code.
To the best of my knowledge, you can't bundle the binary with the extension. But you might be able to (partially) do it the other way around: have the native code also install the extension:
There is a way to partially automate the process of installing the extension: you can pre-load the extension via the registry. This only applies to extensions on the chrome web-store (CWS). I believe this requires to reboot chrome. And of course the user is notified that an extension was installed. see here - https://developer.chrome.com/extensions/external_extensions
There's also something called "inline installation" - not quite "automatic", but this should make it easier for your users to install the extension from "within" your site (as opposed to the CWS). The extension still needs to be hosted on the CWS, but the user needs not navigate there.
see here - https://developer.chrome.com/webstore/inline_installation (and especially the line section - about verified site - which requires that you register your site with Google - and thus may render this technique useless to you)
I'm planning to make a login system by USB, so if you put in a USB-drive and open a specific webpage, the website asks the USB-drive for the code (e.g. by a JavaScript file, a redirect or something like that).
The problem is, because of sandboxing, you can't load or redirect to local files. I don't know a solution for this problem. Can you guys help me? I don't need specific code, just an example or something in that way.
Maybe you can read up on USB-HID. Wikipedia:
The USB human interface device class (USB HID class) is a part of the USB specification for computer peripherals: it specifies a device class (a type of computer hardware) for human interface devices such as keyboards, mice, game controllers and alphanumeric display devices.
Here are some references:
USB HID (Human Interface Device)
node-hid - Access USB HID devices from node.js
DepthJS: 'Allows any web page to interact with the Microsoft Kinect using Javascript'.
A related Stackoverflow question:
Write data to USB HID using Javascript, HTML5, or any cross platform language (supports Android)
One other possibility is to check out the Chrome HID (Human Interface Device) APIs:
Interacting with USB HID devices from web apps – via Chrome Apps, see below
Relevant Chrome API docs
Please note that for the time being, you cannot interact directly with the USB device (i.e. you cannot access any WebAPI offering that kind of fine-grained control).
Building a Chrome App (different from a Chrome Extension) may help; This article may point you in the right direction, since it also provides sample code.
The only way I can think of is putting a html file on the usb stick that essentially generates some sort of login token and gives you a link or a form to a login processor. You can then access the webpage by opening the local file first which will redirect you to the actual webpage.
This local script may include a javascript from the server to get some challenge-response-data which it hashes somehow (perhaps in combination with a password) and puts it into the form data.
Web PKI authentication from Modern Browsers may be achieved by using Browser Extension. One such extension is Signer.Digital browser extension. Use below Javascript promises from the APIs provided by Signer.Digital extension.
SignerDigital.getSelectedCertificate() to register user's certificate
SignerDigital.signHash(hash) to sign token at browser and verify at server
For all Javascript APIs refer to SO Answer https://stackoverflow.com/a/63173083/9659885
Disclaimer : I work for a company supporting the application below
Hello, you may try to use Nexu open-source application for communication with smartcards or USB tokens. It also support PKCS 12 keystores.
For example, the application is connected to the DSS webpage on the website of European Commission : see the link.
I need to allow users of my Web App to save files in their local file system after working on an editor implemented with javascript ( to work on a browser )
I heard about FileWriter API in HTML5, but not sure if it is supported in any of the Firefox versions, particularly FireFox 5.
Does anyone have any alternatives apart from Server side processing to allow users to save files into their local filesystem ( ofcourse with a permission from the user ) in FireFox. As I read Google Chrome supports FileWriter API though am not been able to make it work yet.
FileWriter is a Google working draft
Firefox team is working on implementing FileWriter also:
https://bugzilla.mozilla.org/show_bug.cgi?id=557540
No, Firefox does not support FileWriter, and the standardization of this API was abandoned (1, 2). http://www.w3.org/TR/file-writer-api/ now states:
Work on this document has been discontinued and it should not be referenced or used as a basis for implementation.
It seems that that API didn't even provide the feature you seem to be looking for:
The API doesn't give you access to the local file system, nor is the sandbox really a section of the file system. Instead, it is a virtualized file system that looks like a full-fledged file system to the web app. It does not necessarily have a relationship to the local file system outside the browser.
What this means is that a web app and a desktop app cannot share the same file at the same time. The API does not let your web app reach outside the browser to files that desktop apps can also work on.
You could use localStorage or IndexedDB to store the data client-side, albeit not in an arbitrary file the user can select via filepicker.
You could write an extension that provides the necessary API to content JS. As of 2015, it's unclear which technology you should use for that.
Downloadify (Adobe Flash initiating a download) is also often mentioned when discussing this. This thread mentions an alternative based on data: URIs.