提示:本站收集StackOverFlow近2千万问答,支持中英文搜索,鼠标放在语句上弹窗显示对应的参考中文或英文, 本站还提供 中文繁体 英文版本 中英对照 版本,有任何建议请联系yoyou2525@163.com。
任何人都知道TS中的路由是什么,以便它获取图像并将其转换为base64吗? 是否要在Facebook上分享本地图片?
问候。
这是我的功能代码:
share(){
let filePath: string = "file:///assets/imgs/pesa4.jpg";
let shreface = this.actioSheetController.create({
buttons:[
{
text:"facebook",
icon:"logo-facebook",
handler:()=>{
this.base64.encodeFile(filePath).then((myBase64: string) => {
this.socialSharing.share(this.message, this.subject, myBase64, this.url)
console.log(myBase64);
})
}
}
]
});
shreface.present();
}
尝试使用assets/imgs/pesa4.jpg
删除"file:///"
如果要将本地存储映像转换为base64,请使用文件和文件选择器插件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.