'Saving a file from Expo CLI to local device (i.e my server)

I am using Expo to create an app that will select an image using ImagePicker using the following code.

        let result = await ImagePicker.launchImageLibraryAsync({
          mediaTypes: ImagePicker.MediaTypeOptions.All,
          allowsEditing: true,
          aspect: [4, 3],
          quality: 1,
        });

Now I have the URL of the image file from result.uri. I want to save it to my computer which is running the Expo server. I cannot seem to find anything that works. Everything points to saving the file in the storage of the mobile device.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source