Skip to content

Instantly share code, notes, and snippets.

@joffilyfe
Created July 6, 2015 15:03
Show Gist options
  • Save joffilyfe/102004dfebaf21c64972 to your computer and use it in GitHub Desktop.
Save joffilyfe/102004dfebaf21c64972 to your computer and use it in GitHub Desktop.
Recuperando um arquivo utilizando a Web API do FFOS
var sdcard = navigator.getDeviceStorage('sdcard');
var request = sdcard.get("my-file.txt");
request.onsuccess = function () {
var file = this.result;
console.log("Get the file: " + file.name);
}
request.onerror = function () {
console.warn("Unable to get the file: " + this.error);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment