Import Folder vs. Insert From URL : Error 1630

I realized that there's an issue with file URLs in FileMaker.

If you Import from a folder ( Importing a folder of files all at once ) you get 4 fields like this:

The File Path comes in as file URLs like this:

file://Macintosh HD/Users/username/...

These look like legitimate URLs, but if you try to use these URLs with the Import from URL script step, you will get an Error 1630 "URL format is incorrect".

The solution is to change the URL from this:
file://Macintosh HD/Users/username/...

to this:

file:///Volumes/Macintosh HD/Users/username/...

Notice the double-vs. triple slash characters (// vs. ///) and the requirement to have the URL start with /Volumes

Another trick/gotcha - I was testing my file: URLs by pasting them into Safari, not realizing that Safari was doing some "helpful" changes to the URL.

For example, if I pasted a URL like this:

file://Macintosh HD/Users/username/Downloads/foobar.pdf

Safari would open the PDF just fine - but the location URL was changed to this:

file:///Users/username/Downloads/foobar.pdf

notice that Safari added the missing third "/" character and removed the volume name.

This was confusing, as a malformed URL that seemed to work fine in Safari wouldn't work in FileMaker Pro.