Is there a native BF technique to download a file from a FileMaker container?
If I am not mistaken you can upload easily via dropzone, but not download container data.
However there are a few work arounds that I have found, virtual folder was the best for my workflow. Heres a link about it:
Do you have link for the other workarounds you found?
No I do not just some experience. Are you just trying to display container data from FileMaker to you FM BetterForms front-end? Or actually download the container data to your pc using FM BetterForms ?
@delfs This will be a major issue for our next project and I am very keen to avoid additional dependencies on paid for services.
No need for a paid service, if you are downloading, you can simply put the file in a web accessible folder and add the link to your BF page.
- See this blog post for a technique to export from a container and make it accessible through the built-in FMS web server: https://msdev.co.uk/sharing-content-via-the-web-from-filemaker/ as previously mentioned above (and I know that work-around works 'cause I wrote the blog post :-))
- You could install this open-source project on a PHP server ‘next to’ your FMS: https://github.com/matatirosolutions/filemaker-container-bridge and this would allow you to send data in and out of containers (directly) - I know this works because it’s already being used by at least one other BF project which relies heavily on container access (and I wrote the code ;-))
- You could avoid having to do any server configuration at all using: https://www.fm-api.com/docs/container/ which (admittedly is a paid service, but it’s affordably priced ;-)) also allows direct access to push content into and out of containers directly through BF (see it working on https://msdev.fmbetterforms.com/#/form/FR_48EB67E7-8E1B-884F-AD2E-CF27AFC5E2C0) - I know that works because, umm, well, this is a shameless promotion of a service I built to solve exactly this problem.
Charles this doesn’t really help as the result is storing 2 copies of every document.
Have you looked at Steves options then?
Also you can remove the files, as the are really just temp.
I have looked at them. It seems like a lot of unnecessary effort to copy file to a second location for on demand downloading and then delete them again afterwards.
I guess don’t really understand why it is not possible to download directly from the FileMaker Server using XML or Data APIs.
It is pretty confusing what your goal is, but if you set up the virtual folder, downloading the container data from a BF site is simple at that point. You just add the download attribute to some button or image that references the link from the virtual folder:
<a href="YOUR_IMAGE_PATH" download> <img src="YOUR_IMAGE_PATH" > </a>
We’ve been struggling with this and are trying out the following technique - interested in any thoughts/improvements:
Steve, thanks for sharing the symlink technique. I was able to use it on MacOS and set up my shared folder in the Documents path. Do you see any potential issues with using this method on a folder within the RC_Data_FMS folder?
Update: FMS V19 ExecuteDAPI script step ( must run as PSOS) will return a url to the container that you can then use to open in a new browser tab. ( Cant use in same tab due to CORS settings FMS has placed in, but may change down road)
Any idea how to get the file to download with the correct filename rather than a really long uuid?
May be able to with a bit of JS ( in new tab due to FMP’s CORs headers)
Seems perhaps the effort of my suggestions wasn’t so bad after all, given that 10 months later this problem still seems to be ongoing, and even hackier workarounds are being suggested
I am researching on something and stumbled across this post. I have a similar need and the way I achieve is is to use file.io (free). User click something on the fmbf’s form (example: fires OnUtility). Business file gets it then isolate the desirable record with the container field. Business file uses insert from URL to send the container up to file.io and retrieve the link. Business file mutates $BF_App with the link in it. Fmbf receives the responses and open a new tab using this link inside BF_App. User clicks to download in this new tab.