Looking for ideas

Hi guys, looking for some ideas on this...

Client is using Filemaker for Job Management (print business). Each job in Filemaker has a corresponding Job Folder on a local Synology NAS device, the name and numbering format of which can be regarded as reliable, so that Jobxxxabc should always have a folder at

smb://server.ip.address/Jobs Folder/Joobxxxzbc/

The client would like a neat way to quickly view the contents of the job folder within filemaker.

I could use a button which just opens the folder using the OS file browser, but I was wondering if there might be a fancy new (Javascript?) way of having a file broswer / previewing function within the Filemaker UI, so that they don't have to change focus in and out of filemaker.

Any ideas?

You could use a plugin to do this - for example, the MBS can do things like this

1 Like

Yeah, I'd prefer not to use a plugin if possible. I thought it might be cool to have a Javascript based File browser, especially if I could get it to authenticate against an SMB/AFP share, and then display the contents...

JavaScript is usually not allowed to do more than a file selection for a file upload field.

And even then you need WebView.InstallMultiFileOpenDialog in our MBS FileMaker Plug-in to get it to allow multi file selection!

Check FileDialog functions.

Don't the Synology NASes have a 'filestation' API that lets you do this kind of stuff? I remember something like this from when I last looked at it (granted, over a year ago).

That would make getting lists of files as easy as making a REST call. Much like you can do with other file services like box.com, dropbox, OneDrive,...

5 Likes

Holy smokes, they do indeed. That's very cool. I think that may be the winner!

I‘m always struggling with grammar for local path and html but I‘m sure there must be a way with a WebViewer.

I know Wim knows a lot, but I'm always impressed to see the breadth of his knowledge. Amazing contributions day after day after day, with a very humble selflessness.

Thank you so much @WimDecorte for all you do for the community.

8 Likes

Hi,
as JamesG didn't specify the OS, Its worth mentioning for others out there, that FileMaker on Windows can do this natively, and from memory I had this style of thing working on Mac many many moons ago. - I will have to boot up a mac and see if I can recreate, but I suspect that newer versions of Safari probably have some security which doesn't allow file browsing

Sample attached

FileBrowser.fmp12 (220 KB)

1 Like

You certainly can use on MacOS.

If you provide a directory, in chrome based browsers you'll see a directory listing, ie, it was opened within the app. Safari is super-charged with "helpers" that will open the file path directly in Finder.

The situation may be reversed if you provide a path to a document. In my test, chrome based browsers "downloaded" a CSV file that was on my desktop. It literally copied the file from my desktop to the downloads folder. In Safari, the CSV file was opened in the app, and displayed in the browser window. I'm pretty sure you can adjust preferences to handle different mime types.

Malcolm