Image Gallery upload
This is the scripting I use to upload images to filemaker. Screenshots are attached to show the different screens used for uploading and sample data entry.
I use the settings below to upload only one image at a time. So, if you select 6 images, it captures all the data for all 6 in JSON format but sends one at a time to FileMaker, and delays each upload by about 50 milliseconds, so it doesn’t overwhelm FileMaker.
const SEND_SETTINGS = {
batchSize: 1, // send X number of image(s) per FM call
delayMs: 50, // inter-batch pause to avoid overwhelming FileMaker
};There are some stragling files in the project folder like s3 bucket js file and others that were default from JSinFM that wasn’t deleted as i tried keeping some files as backup just incase as well as duping files as backup but hopefully yall
In the screenshots you will see how it looks uploading. The upload button is on the client layout but there is a portal that shows our services that are created/assigned to that client that you cant see behind the card window. When you click the button to upload based on that client, it captures the client ID in top left corner as well as a list of all services location and recID in json format. When you add an image there is a dropdown as in one of the screenshots that you can choose which service location to add that particular image to. (IE: if you have 6 differnet services and upload 6 images, 1 per service, then just assign each image to the related service via the dropdown. Then you can add a description as well per image then click submit. It takes all the data, description, serviceID, image base64 code, service location etc and sends it all to filemaker and runs a specific script to create all the records for it.
If need be, i can show it sometime and let yall see it. Not sure if i can step through the scripts in filemaker in debug mode as it bogs down my mac but running as normal user would it works great.