GithubHelp home page GithubHelp logo

photo_upload_directive's Introduction

#Photo Upload Directive for Web and Mobile Apps (AngularJS)

This directive enables to take a picture, post it to a webservice and execute a callback on the result.

In case of an hybrid app under Cordova, the directive privileges the native camera plugin and file transfer plugin.

Otherwise, it shows the classical input field for files in case of a web app, in order to upload a file.

Usage

The usage of the directive makes it straight-forward :

<input type="file" file-upload-url="YOUR POST URL" file-callback="callback" />
  • "YOUR POST URL" is the URL where to post the image

  • callback is the function to execute on the result data of the POST.

Have a look at index.html to see an example.

Install

Install cordova plugins in your cordova project :

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-file-transfer.git

cordova plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-camera.git

photo_upload_directive's People

Contributors

christopher5106 avatar

Stargazers

 avatar 禾呈 avatar Abay Zhuang avatar  avatar

Watchers

James Cloos 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.