使用保存在同一文件中的 react-native-signature-capture 的多个签名
Multiple signatures using react-native-signature-capture saved in same file
我正在开发使用 react-native-signature-capture 收集多个签名的 React-Native 应用程序
当我想使用 result.pathName 将生成的文件上传到 S3 时
结果我总是得到相同的文件。每个新签名都在内部写入同一个文件,即:/Users/adnan/Library/Developer/CoreSimulator/Devic…53-4B89-84A2-B2D72D004241/Documents/signature.png
当我使用 base64 (result.encoded) 时,它总是 return 不同的签名,正如预期的那样,但我希望将文件上传到 S3,因此我使用 result.pathName 和一切正常,但我为所有用户获得了相同的签名。
onSaveEvent = (result) =>
{this.props.dispatch(setFieldParticipantAction('current_participant_sign_uri',result.pathName))
this.setState({ isVisible: false })
}
onDragEvent = () => {
this.setState({sigChanged: true })
}
saveSign() {
this.refs["sign"].saveImage();
}
我已经使用了这个拉取请求中的代码,它使我的组件可以使用多个签名来获得唯一的文件名:
https://github.com/RepairShopr/react-native-signature-capture/pull/179Pull request
我正在开发使用 react-native-signature-capture 收集多个签名的 React-Native 应用程序
当我想使用 result.pathName 将生成的文件上传到 S3 时 结果我总是得到相同的文件。每个新签名都在内部写入同一个文件,即:/Users/adnan/Library/Developer/CoreSimulator/Devic…53-4B89-84A2-B2D72D004241/Documents/signature.png
当我使用 base64 (result.encoded) 时,它总是 return 不同的签名,正如预期的那样,但我希望将文件上传到 S3,因此我使用 result.pathName 和一切正常,但我为所有用户获得了相同的签名。
onSaveEvent = (result) =>
{this.props.dispatch(setFieldParticipantAction('current_participant_sign_uri',result.pathName))
this.setState({ isVisible: false })
}
onDragEvent = () => {
this.setState({sigChanged: true })
}
saveSign() {
this.refs["sign"].saveImage();
}
我已经使用了这个拉取请求中的代码,它使我的组件可以使用多个签名来获得唯一的文件名: https://github.com/RepairShopr/react-native-signature-capture/pull/179Pull request