Default App Folder Not Working

Hi,

I’m using google cloud storage to store photos and files. When I store a photo, a default base folder is automatically created for me. The base folder name is the source ID found in the storage option of a table. So the path in google cloud is buckets > [bucket name]> [source id]> [app name]_images > [file name]. Having the source id as the default base folder is a problem when the app is copied. When the copied app is looking for a photo, it is looking for a file path with ITS source id, not the old app’s source ID. Obviously, this path would not exist, and therefore the new app is broken.

I tried dealing with this issue by specifying a default folder. But this does not seem to work at all. No matter the input, it still uses the configuration specified above. I’m not sure what I’m doing wrong. Please advise. For right now, the only solutions seems to be using an absolute path at the image field level. This isn’t ideal because one has to specify a path for every file field created, to avoid the copy issue.

Thanks!

G

AppSheet pathing for files and images is a little quirky. There are two ways AppSheet deals with pathing for these:

  1. If the datasource is cloud based file system, AppSheet uses relative pathing based on the location of the datasource object (aka sheet)
  2. If the datasource is a database, then the App Default Path is used.

I assume you are using a sheet as your datasource? In this case, the location of the sheet is the “root”. AppSheet will create either a Files folder, for a File type column, or an “Images” folder, for an Image type column, at the “root” location. There is a “Path” option in both automation and in the columns themselves to specify your own Folder name (and add sub-folders) if you wish. BUT you cannot override the relative pathing logic for the File and Image column types.

Due to this relative pathing logic, copying a sheet-based app is not a problem. The sheet is placed into the NEW normal AppSheet app folder and any uploaded or generated files/images will the follow the default path logic and be properly associated with the new app.

4 Likes

Hi,

I don’t think i was very clear with my question. If I’m using sheet as my data source and google cloud as storage for photos, can I set a default folder for those photos?

With the default settings, when a photo is submitted in the app, this is the created path in google cloud: buckets > [bucket name]> [sheet source id]> [app name]_images > [file name]

Instead, I want the created path to be: buckets > [bucket name]> [my default folder]> [app name]_images > [file name]

In short, is it possible to replace the sheet source id folder name, with another name created by me?

G