We have the following requirement: the users of our website should be able to upload data from their handheld scanners to our web site.
The scanners are mapped to a local drive on the PC. It is pretty easy to write a .NET program and access the file from their device and send these files to a webservice.
Our users would like to have this directly from the webpage. They hit a button, and a component (of the website) reads the data from the device and sends it to the server.
I know that this should be possible with these technologies: * Java applet * Microsoft Silverlight * writing a rich client program which sends this to our web services (the users would like to get away from that)
Well both of them are not looking too attractive (isn't Silverlight dead anyways ?), so I would like to know if there are any other technologies which could be used to access a local file on the client from a web page ?
this is a recurrent question. I've tried some of the alternatives comented above and more or less they do the work.
For me, as a Java developer use a JavaFX applet seems the best option. What I did is not to create a visual applet which still being so heavy and hard to integrate with the web design. But instead I've created a 1px applet which exports javascript privileged functions. http://docs.oracle.com/javase/tutorial/deployment/applet/invokingAppletMethodsFromJavaScript.html
Anyway you must sign the applet using a valid CA and even with that you will still having issues with some users, annoying messages because java not updated, installed jre 32bits but using 64 bits browser, some antivirus produce applets malfunctions, etc...
Also you can use this framework to create a plugin for firefox, chrome and IE http://www.firebreath.org/display/documentation/FireBreath+Home The installation is almost transparent for the user, that does not need to have anything more than a browser installed. The cons is that you need to implement it in C++ so it is up to you do cross platform plugins, of course you need compile it one version for each operating system you want to support. Firebreath provide some commons API's supported in majors SO.
Other option useful in some (not all) cases: You can create a systray desktop app that can do the privileged work. That app can start a tiny web server binded in the localhost interface, the browser can use cross domain ajax calls to communicate with the systray app and send instructions and updates to the web app.
Anyway be carefully implementing this kind of solutions, that requiere a bit effort to offer a good experience to the user.