After updating App, URI under FileSystem.documentDirectory no longer works

Hello Forums, I would appreciate if anyone could give me some advice on the following issues. (I’m not good at English, so I’m sorry if it is difficult for you to understand my English.)

I use image picker to pick an image and store the image URI to FileSystem.documentDirectory With the following code.

  onAddImagePressed = async () => {
    const { status } = await Permissions.askAsync(Permissions.CAMERA_ROLL);
    if (status === 'granted') {
      const result = await ImagePicker.launchImageLibraryAsync({
        allowsEditing: true,
        mediaTypes: ImagePicker.MediaTypeOptions.Images,
      if (!result.cancelled) {
        const dirPath = await FileSystem.getInfoAsync(

        if (!dirPath.isDirectory) {
          try {
            await FileSystem.makeDirectoryAsync(
              { intermediates: true },
          } catch (e) {
        const imageID = this.state.articleIndex;
        const imagePath = await `${

        await FileSystem.copyAsync({
          from: result.uri,
          to: imagePath,
          articleImg: imagePath,

I can save successfully with the above source code.
But, when I update the app in appstore, appID changes every time as below and the URI no longer works.

  • before update -

  • after update -

How to manage this problem?
Thank you in advance for your help.

*ExpoSDK version: “32.0.0”
*Referenced question

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.