0

how to browse and upload file in kendo UI mobile application using CORDOVA. if anyone done this before please help me to achieve upload file. This upload should work in both android and IOS platform.

OnaBai
  • 40,767
  • 6
  • 96
  • 125
user3373819
  • 89
  • 2
  • 10

1 Answers1

0

The Cordova Plugin API documentation is a great resource for samples. Recently, as of Cordova v3.5.0 all were documented on this page. As of v3.5.0 and higher the documentation and samples are maintained on GitHub.

To answer your question, you can use the Cordova Camera plugin for both taking a picture and/or retrieve a

// using the Cordova Camera plugin
navigator.camera.getPicture(onSuccess, onFail, { 
    quality: 50,
    destinationType: Camera.DestinationType.FILE_URI 
    sourceType: Camera.PictureSourceType.XXX
});

Notice that the Camera.PictureSourceType can be one of the following:

  • Camera.PictureSourceType.CAMERA allows the user to take a new pictures
  • Camera.PictureSourceType.PHOTOLIBRARY or Camera.PictureSourceType.SAVEDPHOTOALBUM allows the user to selected an existing image

Easy as cake, but the documentation is quite self explanatory.

Juliën
  • 9,047
  • 7
  • 49
  • 80