I'm trying to make a notes app with attached images. When the user adds an image I save it to my server and then save the path to the image in my server.
{this.state.img ? <Image
style={stylesCP.image}
source={{ uri: require(this.state.img)}}
></Image> : null}
While the img state contains: /Users/myUser/Study/React-Native/Note/WebApplication1/WebApplication1/images/1_3_2021_5_06_08_PMimg.jpg
And I'm getting this error:
Failed building JavaScript bundle.
SHA-1 for file /Users/myUser/Study/React-Native/Note/WebApplication1/WebApplication1/images/1_3_2021_5_06_08_PMimg.jpg (/Users/myUser/Study/React-Native/Note/WebApplication1/WebApplication1/images/1_3_2021_5_06_08_PMimg.jpg) is not computed
Can anyone help me with that please?