i created two apps, one for users and one for...

(Jader James) #1

i created two apps, one for users and one for me (admin app)…

*in user app they can upload images of their field service of course

*in admin app my team can upload images for format the templates used in user app

*I am testing AWS S3 and did one upload of image in user app and one upload of image in admin app

*RESULT =

the images was saved in S3 (OK), but if they are saved in one app, only can be used in the same app, does it true? or i am doing any error?

When i generate a report , only images uploaded in same app was renderized in PDF. :frowning:

(Jader James) #2

how i found a “solution”: in the user app, set the table with image uploaded by admin app from READ ONLY to ADD, DELETE, UPDATE… this is not what i really wanted, then its can be a BUG?!

admin app: table department NO READ ONLY

user app: table department READ ONLY (i had to change it :frowning:

)

(Reza Raoofi) #3

But you said both apps could upload images! Do they each have their own separate table in AWS S3 for image storage? Maybe for some reason the new custom object storage requires table to allow full read/write access in the app?! Adding @Harry

(Jader James) #4

@RezaRaoofi yes " both apps could upload images", but in different tables…

user app can upload image in table PHOTOS, but need of the images uploaded in table DEPARTMENT through the admin app for create a report (images used in header).

Im using the same account in S3, and the storage and permissions are OK.

(Aleksi Alkio) #5

Is the Sync option “Delta sync” in your admin app as ON? If yes, try to change it to OFF.

(Jader James) #6

it doesnt! @Aleksi_Alkio, is OFF

(Dinh Nguyen Nguyen) #7

@jader_james I assume you have 2 different object stores in AWS S3, one for uploading user images, one for uploading admin images. If you want to be able to use both user images and admin images in the same app (doesn’t matter if this is admin or user app), you need to connect both of these object stores to the app. Currently, each table in an AppSheet app can only be connected to a single object store. That means you need to have 2 different tables in your app, one for each object store. Depending on how you want to use the images, you can set the permission for each table accordingly. For example, in the user app, the table connected to the user object store can be set to allow uploads, but the table connected to the admin object store can be set to read-only.

(Jader James) #8

I have used the same DB and the same object storage and with the step that I have talked to you, resolved the problem, but is it a bad pattern?

(Dinh Nguyen Nguyen) #9

@jader_james That really depends on how you want to organize and manage your images in S3. From AppSheet’s point of view, whether the images are stored in the same or in separate object stores should make no difference. However, if you want to assign different security or access policies to images from users and images from admins, it’s a good idea to separate them into different stores. Also, from your description of the problem, I assume that images from users and admins belong to different categories, i.e. they are images of very different things. As a result, it is also a good idea to separate them into different stores for better organization. This is just like how you’d want to separate images of,

let’s say orders and receipts into different folders in a traditional file system.

(Reza Raoofi) #10

@Harry what I still don’t understand in Jader’s case is that how he fixed it by just allowing add, update, and delete for the table in user app!?