I have a case where I would like to list all blobs in windows azure blob storage in a browser application where I dont want the user to submit their storage account credentials to the webserver. Wonder if its possible to use nodejs libraries for windows azure in the browser or I need to implement my own little javascript lib for doing the stuff I need in the browser.
I think you can take a look at Node.js SDK. It's for Node.js but I think could be used for browser with some code changes.
http://www.windowsazure.com/en-us/develop/nodejs/
If I understand correctly, one simple solution could be to create a Shared Access Signature on the blob container with List permission and then doing a List Blobs REST API call through AJAX. This will return you the list of blobs in XML format which you can parse and present it in the browser.
Related
**I'm new to this field. I'm making a plugin that stores text data to chrome local storage using chrome.storage.local.set api. All I want is to Migrate that data from chrome local storage to MongoDB server. Is there any way to do it??..
You would need a server side for that.
What you can do is create a route in your server side that will save the data to the mongodb database and call it using the fetch api in your client's javascript.
I would recommend NodeJS and Express for that server side as it is coded in JS that you probably already know and the api is fairly simple.
I am creating a web app that allows user to upload some data to the web server. But I want this app to work offline as well , so if network is not availabe it should store the data in local storage and it should push the data to the server when network is available.
Is there a JS library that could simplify this?
The feature you're looking for is the Background Sync API.
You could use workbox-background-sync to make usage easier, including a built-in polyfill for the behavior on browsers that don't support the Background Sync API.
JsStore is a client-side javascript library for performing database operations inside the browser using indexeddb. You can check that.
How can I reach a HTML file over FTP stored on Firebase hosting. i.e. on how can I call ftp://your_ip_address/bridge.html if bridge.html is hosted with Firebase?
Why do I want to do this?
So I have a website running WebRTC for camera access. I've been getting some complaints from users about how WebRTC is not available in apps (i.e. UIWebView / WKWebView don't support WebRTC). The best solution I can think of is to make a pop up that takes users to Safari in this instance. Detecting this scenario is quite straightforward. The issue is really opening Safari. I found this solution on how to do this, however, it requires that I make an FTP request to a server. I'm using Firebase for hosting so I don't really know how to access the level of filesystems. Is there another way to set this up or something I can do on Firebase to get to reach a HTML file over FTP from Safari URL schemes? If not then is the only alternative for me to get a separate FTP server and store the file there?
Firebase Hosting does not implement an FTP server, so you can not interact with it with FTP client commands. If you must use FTP to read from/write to your hosting provider, you may want to look at other services that do support that requirement.
We are building a Java website to share documents with users.
Once a user access to his documents, he can digitally sign them with his certificate (It is stored on client-side).
The requirement is an on-line sign with a “sign button” on the documents list.
We researched ways to accomplish the requirement but apparently, there is not a way to do that without using Java Applet or a secured server that contains the users certificates.
We know what other solution would be use Itext on a stand-alone Java Application but that is not an online solution.
The question is:
Is there a way to access to the user's key-store or load the certificate from the file system on the sign process without use an applet?
Thanks and regards.
It is not possible to use a certificate installed on system/browser keystore using javascript due to security restrictions
An alternative solution is to install on the client an application with an embedded web server and send the document from the webpage to be signed at the moment. This application can use the keystore and include the itext library.
If the user has a certificate file (.p12/.pfx) it is possible to load the content using WebCryptographyApi and sign the document in client side (without uploading certificate to server. See How to load a PKCS#12 Digital Certificate with Javascript WebCrypto API
#pedrofb is right, you won't, without the help of a plug-in, be able to access the certificate store on the host.
You can in browser use WebCrypto with a library like PKIjs load a key into the browser and sign with it, you can also verify the PDFs signature if you like. Here are some related examples:
https://pkijs.org/examples/PDFexample.html
https://pkijs.org/examples/PKCS12SimpleExample.html
https://pkijs.org/examples/PKCS10_complex_example.html
http://unmitigatedrisk.com/?p=543
You can see https://hwcrypto.github.io/ for a discussion, and plug-ins that provide access to smart cards within the browser.
Modern browsers does not support applets. For browser based signing scenarios, my company has published free Chrome extension Signer.Digital and setup may be downloaded from cNet using link https://download.cnet.com/Signer-Digital-Chrome-Extension/3000-33362_4-78042540.html
Installing this host and restarting Chrome will automatically add Signer.Digital Chrome Extension
Javascript to call method from extension:
//Calculate Sign for the Hash by Calling function from Extension SignerDigital
SignerDigital.signPdfHash(hash, $("#CertThumbPrint").val(), "SHA-256") //or "SHA256"
.then(
function (signDataResp) {
//Send signDataResp to Server
},
function (errmsg) {
//Send errmsg to server or display the result in browser.
}
);
If Failed, returns error msg starting with "SDHost Error:"
If success, returns Base64 encoded pkcs7 signature - as you said, use iText or any suitable library to inject sign to pdf.
Disclosure: I work for CISPL (Signer.Digital)
I'm working on an HTML/JavaScript GUI application that will run on mobile devices (using Cordova) and also as a hosted web page that's accessible from a desktop web browser. I want to give the option to read and store data in a local offline database (SQL database most likely), as well as the option to connect to a web server and read/update data from the server as well.
If anyone has done something similar without having to write the data access routines twice (once for the server side, and once for the client offline storage side), I'd like to get some suggestions.
One solution I am thinking about (which has some unresolved issues still):
I could write the server in any platform (PHP, Java, Js, etc.), but don't want to replicate the data access code for the offline version, so am thinking to do the data access portion in JavaScript--maybe write a node.js server, and use sqlite for local/offline databases (which Cordova supports). I can't figure out how to provide similar local data functionality on a web browser.
The simplest option would be to run a server on the local machine, but I don't think that is easy in Cordova or on a desktop browser.
Check out PouchDB. PouchDB is compatible with CouchDB and is 100% Javascript. You can do some cool offline syncing to online syncing with CouchDB.
Check out https://cloudant.com/blog/pouchdb/ and http://pouchdb.com/faq.html.