An angular module wrapping cloud storages API
Dropbox: Yes
Google Drive: Not yet
...
In your document include this scripts:
- angular-cloud-storage.js
- angular-local-storage to enable caching support (Optional)
- Regarding the services you are using:
- For dropbox: dropbox/dropbox-js and services/dropbox.js
In your AngularJS app, you'll need to import the angular-cloud-storage module:
angular.module('myApp', ['angular-cloud-storage']);
$storage.use(serviceName, config)
Returns a boolean for success
expireTime: time in seconds before the file cache will expire (120 by default)
$storage.cache(boolean, expireTime)
Returns a boolean for success
$storage.clearCache()
Returns a boolean for success
Every method below returns a promise
$storage.authenticate()
$storage.isAuthenticated()
$storage.signOut()
force_sync: force to read the file (if you are using the cache)
$storage.readFile(path, force_sync)
$storage.writeFile(path, data)
$storage.readdir(path)
$storage.remove(path)
$storage.mkdir(path)
$storage.move(fromPath, toPath)
$storage.copy(fromPath, toPath)
grunt connect
to start a webserver and open http://localhost:8080/example in your browser
grunt connect
to start a webserver and open http://localhost:8080/test/test-runner.html