MY CODE
takePicture = async () => {
if (this.camera) {
let photo = await this.camera.takePictureAsync({ base64: true })
FileSystem.moveAsync({
from: photo.uri,
to: FileSystem.documentDirectory + 'photos/' + Date.now() + '.png'
}).catch((error) => {
console.log(error)
})
}
}
ERROR MESSAGES:
File 'file:///var/mobile/Containers/Data/Application/E0AC92B0-947F-43C0-AAFC-B2CA13017D5C/Library/Caches/ExponentExperienceData/%2540anonymous%252Ftoomuch-d435e834-ce9b-4305-aa47-0dc6823770c6/Camera/14657705-9F18-4F51-A01E-8989CDB73B03.jpg' could not be moved to 'file:///var/mobile/Containers/Data/Application/E0AC92B0-947F-43C0-AAFC-B2CA13017D5C/Documents/ExponentExperienceData/%2540anonymous%252Ftoomuch-d435e834-ce9b-4305-aa47-0dc6823770c6/photos/1525626717492.png'.
- node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:78:57 in <unknown>
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:398:4 in __invokeCallback
- ... 4 more stack frames from framework internals
How can i save one photo to camera roll after it’s been taken?