-1

I want to make sure I am creating my file system properly for my react native app.

Currently, I receive images on the app from the user, and then I save them in an images folder within the project. The file system's structure looks like this:

Computer
 |
User 
 |
RN_Project ------------------------    
 |                                |
Source -------------------      App.js
 |          |            |
Images  component1.js  component2.js

What I am wondering is whether the Images folder will contribute to the size of the app on the App Store? Am I correct in storing user uploaded images in this file system? Or am I supposed to put the image folder elsewhere on the computer? What contributes to the size of the download on the App Store?

My gut feeling is that the images folder should not be in the app's file system, but please let me know

kentonpalmer
  • 255
  • 2
  • 16

1 Answers1

0

When you download files from a mobile app, regardless of the platform, they are stored in a directory that is allocated specifically for user data downloaded from that app. It does not change the actual size of the app itself, and any filepath that you specify for the location of the downloaded data will be created relative to the root of that directory.

Kai
  • 2,529
  • 1
  • 15
  • 24
  • Wait so to be clear, if I am receiving images in a post/comment forum from users, should I save those images directly to my project file where my .js components are? Or should it be stored elsewhere – kentonpalmer Feb 25 '19 at 21:40
  • Receiving the images during the normal operation of the app, or while building the app? – Kai Feb 25 '19 at 23:29
  • During the normal operation of the app – kentonpalmer Feb 26 '19 at 01:23
  • During the normal operation of your app, you don't have that level of control. The directory structure effectively does not exist anymore – Kai Feb 26 '19 at 01:34