Housekeeping

Hi
Just wondering what the best option is for housekeeping with images.
My App collects images and forwards via an email. Once they are sent to the recipient they are no longer required.
I am aware we can delete the data from the table but how do other users delete the actual images so saving on storage space?

1 Like

Hi @Dave_Willett

I would use Apps Script in order to delete images from the folder, provided their names are no longer found in the data table.
I’m afraid it’s hard to deal with it.

3 Likes

Thanks @Aurelien

1 Like

One option is to use AppSheet’s new feature of folder as table. Once you create a table based on folders of your images, you can delete them from the app. Though please note the following

  1. The images go to the trash folder of the G drive . G drive trash anyway gets emptied automatically after every 30 dyas.

  2. The image reference from the other tables is not removed. So if you have image path stored in some other Appsheet table when you captured the image through app, that path will continue to remain intacts. You can set up some automation to delete the image paths as well when the images are deleted from the folder table or viceversa.

  3. The images should not be “Required” fields in the tables from where those are deleted.

I tested the above by including an image folder as a table and deleted the image files fromthe app. I also deleted the image paths in the tables where these were referred with the help of actions. Extensive testing though will show any cracks in the approach.

[Document Processing - Folder as a Table](https://community.appsheet.com/t/document-processing-folder-as-a-table/39282) AppSheet Automation

Automation- DocProcessing-FolderAsATableExample.zip (405.9 KB) Sample assets for trying out Folder as a Table feature of Document Processing.

4 Likes

Thanks Suvrutt, very useful.
I’ll study this in detail.

2 Likes

You are welcome. Please take a look at the Tips and tricks section below tip at your convenience.

[Delete app images or files in an app record from Google Drive itself when you delete the record from the app](https://community.appsheet.com/t/delete-app-images-or-files-in-an-app-record-from-google-drive-itself-when-you-delete-the-record-from-the-app/62235) Tips & Tricks ?

There are many posts in the community about wanting to delete the image files also from the Google drive when a row in a table is deleted. One can do so using the feature of “Folder as a table” introduced around one year ago. We can use this feature to delete the image and other document files from the Google drive itself when the row in the app is deleted. Steps Add the folders names from G drive where images and files from the app are stored as tables in the app. Document Processing - Fo…

2 Likes