By default, AppSheet includes the key value in the image file name. See the 'Image storage in the cloud' section of this doc for details: https://support.google.
There have been a few posts about how to use the default behavior to create a semi-custom name. This one is really good: https://www.googlecloudcommunity.com/gc/Tips-Tricks/More-User-Friendly-Image-names-for-images-uploa...
But what if we want to fully customize the file name? What if we have multiple photos collected in one table? That's what this post is for.
You should now be able to add records to the Inspections table and see the custom file names get applied. Woohoo!
This is a simple example to highlight the integration with Apps Script to customize file names. Feel free to take it as a starting point and customize for your apps.
Thanks for adding the link. I didn't find @JPAlpano's post when I was searching. Yes indeed, exact same idea!
Wait... we need to use a script for this?
Why not a "filename" option just like PDFs?
-------------------------------------------------------------------------------------------------------
Your script is cleaner and more simplified. Thanks for the tip.
Hi,
I don't understand why it renames well when we work with a main folder (example "projects"), but it doesn't work in subfolders (example, "projects/subprojects")
Example;
Field [photo1] type image
Value Type Details, Image/File folder path = "projects"
Work fine. Create the directory, rename the image and upload it, everything is ok
Field [photo1] type image
Value Type Details, Image/File folder path = "projects/subprojects"
It does not work, The image is uploaded to the corresponding folder but the file is not renamed with the proposed name
App works on google drive (G.Workspace)
I have also tested with the default app directory (contenido_images/projects/subprojects), unsuccessfully.
I have also tested task boot process "rename photo 1", changing the values in the filepath of function parameters, without success.
Thanks
Javier
The script provided does not handle subfolders. It assumes that the path is only one-folder long.
To handle a chain of subfolders you need to have an additional folder processing function in your Apps Script.