mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-07 23:03:19 +08:00
feat(plugin): add base64 to gallery
This commit is contained in:
parent
22bb218e10
commit
8c17a2a6c2
31
src/plugins/base64togallery.ts
Normal file
31
src/plugins/base64togallery.ts
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import {Plugin, Cordova} from './plugin'
|
||||||
|
/**
|
||||||
|
* @name Base64 To Gallery
|
||||||
|
* @description This plugin allows you to save base64 data as a png image into the device
|
||||||
|
* @platforms Android, iOS, Windows Phone
|
||||||
|
* @usage
|
||||||
|
* ```ts
|
||||||
|
* Base64ToGallery.base64ToGallery(base64Data, 'img_').then(
|
||||||
|
* res => console.log("Saved image to gallery ", res),
|
||||||
|
* err => console.log("Error saving image to gallery ", err)
|
||||||
|
* );
|
||||||
|
* ```
|
||||||
|
*/
|
||||||
|
@Plugin({
|
||||||
|
plugin: 'cordova-base64-to-gallery',
|
||||||
|
pluginRef: 'cordova',
|
||||||
|
repo: 'https://github.com/Nexxa/cordova-base64-to-gallery'
|
||||||
|
})
|
||||||
|
export class Base64ToGallery {
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param data
|
||||||
|
* @param prefix
|
||||||
|
*/
|
||||||
|
@Cordova()
|
||||||
|
base64ToGallery(data : string , prefix? : string ) : Promise<any> {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user