我是本机反应的新手。我创建了一个签名框,我可以在其中绘制签名但是在确认按钮上我想将该签名图像保存在应用程序中。在我想将该图像上传到服务器之后。注意: - 我不想将 base64 发送到服务器。我想将 base64 转换为图像,然后图像将发送到服务器。那可能吗。如果是,请帮忙。
这是代码
export default class Kyc extends Component {
constructor(props) {
super(props);
this.state = {
singleFileSIGN:''
};
}
handleSignature = signature => { }
};
render () {
return (
<View style={styles.container}>
<View style={{flex: 1, width:355,
...Platform.select({
android: {
marginBottom:-80,
borderColor: '#FF8C00',
borderWidth:1
// marginBottom:-150
},
}),
}}>
<SignatureScreen style={{height: '400%'}}
ref={this.ref}
onEnd={this.handleEnd}
onOK={this.handleSignature}
onEmpty={this.handleEmpty}
onClear={this.handleClear}
descriptionText={'Sign here!'}
/>
</View>
</View>
);
}
}