Skip to content
This repository has been archived by the owner on Apr 22, 2018. It is now read-only.

RonaldPK/SaveImageFromURL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova Save Image From URL -Plugin

A very simple plugin for Cordova 3.x.x to save an image from a URL.

by Ronald Klip (github.com/RonaldPK)

Supported Platforms

  • iOS

Adding the Plugin to your project

Through the Command-line Interface:

cordova plugin add https://github.com/RonaldPK/SaveImageFromURL.git

Release Notes

Version 1.0.0 (22-08-2013)

  • Initial release.

Using the plugin

The plugin creates the object window.plugins.saveImage with one method:

saveImageFromURL()

Takes two parameters: url and a string with the name of the callback method

window.plugins.saveImage.saveImageFromURL(url, cbRef);

The plugin returns 1 on success and 0 on failure. Failure is most likely due to the app not having access to the user's Photos.

Example

var myCallbackMethod = function(returnVal) {console.log(returnVal);}
window.plugins.saveImage.saveImageFromURL('http://www.example.com/path/to/image.png', 'myCallbackMethod');

About

Cordova plugin to save an image from URL

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published