In this post, we will talk about how to convert the HEIF file to a JPG file using ConvertAPI in FileMaker applications. It will work above FileMaker version 15.
One of our customers needs to convert the HEIF file to a JPG file from FileMaker, if we do this task manually, it will be a time-consuming process and manual errors may occur.
To avoid the above-mentioned issues, we have found a solution to convert the HEIF file to a JPG file from FileMaker using ConvertAPI. When we call the ConvertAPI using the FileMaker Insert From URL function, it will convert the file and will provide the result in JSON format. We can then process that JSON data using FileMaker JSON functions and then the converted file can be used in our application as per our need.
Steps to Convert the HEIF file to a JPG file.
Step 1: Create an Account on the ConvertAPI website.
- Create an account on the https://www.convertapi.com/ website and note the “Secret” key from “My Dashboard”.
Step 2: Create fields and Scripts in FileMaker.
- In FileMaker Database Create two Container Field one for the HEIF file and another for the JPG file.
- Create a Script to convert the HEIF file to a JPG file using Convert API URL and cURL.
- Initially, we need to set a variable to the value of the HEIF file container field. Variable name must should be end with (.heic) ex: $FileToConvert.heic
- Need to set a variable for the following URL
- Need to set a variable for the following cURL ,
- Add “Insert from URL” step, here in “Specify URL” pass the above URL variable and in “Specify cURL Options” pass the above cURL variable.
- Need to set a variable to get the “jpg” output URL from the JSON output, like following,
JSONGetElement ( $Result ; “FilesUrl” )
- Finally, add a “Insert From URL” for the JPG container field and pass the above variable to get the jpg file.
- For clear detail, please refer below screenshot
- After executing the above script, it will convert the HEIF file to a JPG file and then store it in the container field, like below
The team at FMDBSolutions hopes this article taught about converting the HEIF file to a JPG file using ConvertAPI. FMDBSolutions is a team of well-qualified experts that have a lot of experience with the many versions of FileMaker Pro and the FileMaker Go app too.
Our team knows all about transitioning, migrating, converting, and upgrading for FileMaker. Companies that require FileMaker Integration can also use our services. We have worked with clients from the USA, Australia, and Singapore and will complete your FileMaker assignment in the best possible way at a lower price but at the same or higher level of excellence.
If you want solutions to your FileMaker database, we can help. Click the below box for a free FileMaker consultation.
You can also leave us your email below for receiving new updates regarding FileMaker and our company.