我在我的 react-native 应用程序中使用 react-native-camera 并且一切正常,但是当我拍照时,照片保存在我不想要的设备上,图像应该发送到 api 但不保存在我的设备上,有谁知道我怎样才能让它不保存在设备上?
render() {
return(
<View style={styles.container}>
<Camera
style={styles.camera}
ref={ref => {this.camera = ref;}}
type={Camera.constants.Type.back}
flashMode={Camera.constants.FlashMode.on}
orientation={Camera.constants.Orientation.landscapeLeft}>
<TouchableOpacity onPress={this.takePicture.bind(this)} style={{zIndex: 100}}>
<View style={styles.cameraButton}></View>
</TouchableOpacity>
</Camera>
</View>
);
}
takePicture()
{
this.camera.capture()
.then((data) => this.sendData(data))
.catch(err => console.error(err));
}