Coder Social home page Coder Social logo

phonegap-dropbox-sync's Introduction

PhoneGap Plugin for the Dropbox Sync API (Android Version)

A PhoneGap plugin for the Dropbox Sync API.

Read my blog post here

Update 1-14-14
- The sample app is now using handlebars.js, fastclick.js, and pageslider.js
- Only 1 view is in the DOM at a time now, this improved performance a lot
- The sample app requires API 19 (Android 4.4.2) SDK to build and run. This is a result of upgrading to PhoneGap 3.3.1

Sample Usage:

Link to Dropbox:

dropbox.link();

List the Dropbox App's root folder:

dropbox.listFolder("/").done(function(files) {
    // each object index in files have properties: path, modifiedTime, size, and isFolder
});

Upload a file to Dropbox:

var localFileUri = "file:///storage/sdcard0/DCIM/Camera/SomeVideo.mp4";
var dropboxFolderPath = "/someFolder";

dropbox.uploadFile(localFileUri, dropboxFolderPath).done(function() {
    // dropboxFolderPath is the Dropbox folder you want to upload the file into
});

Upload a folder to Dropbox:

var localFileUri = "file:///storage/sdcard0";
var dropboxFolderPath = "/someFolder";
var doRecursive = true;

dropbox.uploadFolder(localFileUri, dropboxFolderPath, doRecursive).done(function() {
    // dropboxFolderPath is the Dropbox folder you want to upload the files/folders into
    // you can upload all subfolders & files within the given local file URI by passing true in the 3rd parameter
});

Note: This plugin requires jQuery 1.5+ for the Deferred Object.

phonegap-dropbox-sync's People

Contributors

ccoenraets avatar rossmartin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.