NPAPI alternative for live file editing

I currently have a web application that allows users to upload files to their computers, edit them with their editors, and automatically send them back to the server when saving and submitting additional data when the file is closed. It uses a Java applet to handle the client side which includes

  • Download file,
  • a send request to lock the file,
  • opening a file in the default desktop application,
  • viewing changes,
  • Uploading a file to the server,
  • a send request to unlock the file on close.

Since chrome will stop supporting NPAPI in September, I need to create an alternative while maintaining functionality. I haven't been able to find many alternatives. The only thing I have found that I could achieve at least anything is Native Messaging, but still I cannot imagine how to use it to emulate the behavior of a Java applet.

So the question is, what alternatives can I use to replace the applet?

0


source to share


1 answer


Looking at your comments, I'm going to break your question down into two main questions:

  • How does native messaging work?
  • How to download a file and run it in an application, etc. in a Windows application?

Built-in messaging allows you to launch an application (which must be registered during installation in order for it to work this way) that can communicate with your extension. You can then talk back and forth to your own messaging app from your extension (or from web page proxying through your extension); your messages should be essentially json formatted (on the javascript side you provide json encodable values, and on the executable side you should read this from stdin and parse it and then write the result to stdout, there are also 2 byte integers preceding each message by specifying message length).



basically when you have a link, you just need to make your application respond to a message that tells it to download the file by doing this, etc. This is what you will need to figure out how to do it - - you can do it with a python script, windows exe, .net app, or whatever you want that can be done, but each has advantages and disadvantages ...

Hope it helps

0


source







All Articles