Claris Certified FileMaker Pro App Developer ExpertClaris Certified FileMaker Pro Server Administrator

A native FileMaker-only method for unzipping .zip archives in container fields

This is a proof of concept. I had an acquaintance whose FileMaker system was receiving PDFs from an external source, which would land in a container field. The problem was, the source was sending them zipped, so instead of filename.pdf he’d get a zip archive, filename.pdf.zip. He was having a hard time finding a reliable automated cross-platform method for unzipping the files and storing the unzipped PDFs in the database.

Using a similar technique to what I used in the Thumbail Resizing and “(Almost) Always Working PDF Viewer”, I created a file that uses a javascript library to unzip container field data in a web viewer and return it to a FileMaker script that places it, unzipped, in another container field, all without using any tools or dependencies outside of FileMaker. It uses the javascript library https://github.com/gildas-lormeau/zip.js, but stores it locally in the database to avoid requiring a live internet connection.

Right now this is hard-coded to only work with zipped PDFs, because the “.pdf” extension is hard-coded into the “Receive unzipped” script. This could be very easily modified to work with other file types, or have the file types read from the .zip file name.

Here’s the demo: FileMakerNativePDFUnzipper


Related articles

Leave a Reply

  • Michael Kupietz
  • Certified Expert FileMaker Pro Consultant & Full-Stack Web Developer
  • Serving clients locally and remotely, in California's San Francisco Bay Area and nationwide
  • Phone: (415) 545-8743
  • Download vCard