            call.reject("The 'type' param is required")
            return;
        }
        
        let decodedData = NSData(base64Encoded: base64, options: [])
        if let data = decodedData {
            let decodedimage = UIImage(data: data as Data)
            if(decodedimage != nil) {
                UIImageWriteToSavedPhotosAlbum(decodedimage!, self, nil, nil)
            }
        } else {
            call.reject("Error with decodedData")
            return;
        }
        