How to save the images into a folder in the app from image url in an Api. and save that path in sqlite.
I tried Expo.FileSystem.makeDirectoryAsync(fileUri, options) for creating a directory then i download the images with Expo.FileSystem.downloadAsync(uri, fileUri, options) and then i move this to the folder when i created Expo.FileSystem.moveAsync(options) . But only thing working will be i can only download the images from the api but the image is download to the Expo.FileSystem.documentDirectory and getting the uri as
and in console i got
[Unhandled promise rejection: Error: Directory ‘file:///data/user/0/host.exp.exponent/files/ExperienceData/%2540tester%252Ftestv1//testfolder/’ could not be created.
How to process the images and create directory and move the file to the created directory.
Thanks for your response. I create a snack with code failing please help.
the error now geting is
[Unhandled promise rejection: Error: FileSystem.moveAsync needs a from path.]
Hey @shibi! That snack had some syntax errors, and it’s kind of hard to tell what’s going on. Would be really useful if just the issue with FileSystem was isolated. I cleaned up the snack to work here Image save in expo - Snack but I’m not sure how to trigger the issue.