FileMaker version 12 or higher.
When 360Plugins are intialized for the first time, they will automatically download all required support files
Drag the plugin from the MAC or WIN folder into your FileMaker extensions, and restart FileMaker.
If the plugin does not load correctly, please send an email to support@360works.com
Install plug-ins for use with WebDirect by dragging the appropriate plugin to FileMaker Server/Web Publishing/publishing-engine/cwpc/Plugins
You do not need to do this step unless you plan on using the plugin with Instant Web Publishing with FileMaker Server Advanced. You will need an Enterprise license to use this feature.
For installing into the Web Publishing Engine with FileMaker Server or FileMaker Server Advanced, drag the plugin from the MAC or WIN(.fmx) folder into the FileMaker Server/Web Publishing/publishing-engine/wpc/Plugins folder. If there is no Plugins folder inside the wpc folder, then create it manually. Restart FileMaker Web Publishing, and now the plugins should be ready to go.
The easiest way to test whether the plugin is working is to call the version function of the plugin, and display that on an IWP layout. If it shows "?", then the plugin is not working. If it shows a number, then the plugin has been installed successfully.
If you are using FileMaker Server 12.0v1, you can follow the same procedure as detailed above for custom web publishing. However, in FileMaker Server 12.0v2 and later, custom web publishing now runs as a 64-bit application and requires the 64-bit version of the plugin You will need an Enterprise license to use this feature.
For Mac, the single plug-in file in the MAC directory contains both 32-bit and 64-bit versions. For Windows, look for the plug-in that has the extension .fmx64 and use it in exclusively in custom web publishing.
To install 64-bit plug-ins, install either the .fmx64 or the .fmplugin to the following directory:
FileMaker Server / Web Publishing / publishing-engine / cwpc / Plugins
If it does not exist, create the Plugin folder manually. Restart FileMaker Web Publishing, and then you can then test a script that contains a plug-in and see if it returns the correct values.
You do not need to do this step unless you plan on using the plugin with scheduled script triggering. You will need an Enterprise license to use this feature.
360Works has created an AutoUpdate helper database which makes setting up AutoUpdate much easier. This file includes pre-configured plugin files which you can place on your server, and an AutoUpdate script for each of our plugins which you can paste into your own solution.
You can get the AutoUpdate360Works file here Follow the instructions included in the file to either host your own Auto Update server or pull the files from ours.
Plugins will run in demo mode until they are registered. While running in Demo mode, the product will run for 2 hours every time you launch FileMaker / FileMaker Server / FileMaker Web Publishing Engine. The 2 hour time limit will reset every time you relaunch FileMaker. There is no expiration date when Demo mode stops working. There are no feature differences between the Demo version and the licensed version.
Once you have purchased the plugin, you can register it with the license key. Once a valid license key is entered, the product will run for as long as FileMaker is running. After FileMaker starts up with the plugin installed, open FileMaker preferences, click on the Plug-ins tab, select the plugin from the list, and click the Configure button. Enter your license key and company name in this dialog. You will only need to do this once on a given machine. Alternately, you can use the registration function to register the plugin during a startup script.
Note: If you are running the plugin with FileMaker Server / FileMaker Web Publishing Engine, you must use the registration function to register the plugin, since there is no preferences dialog on FileMaker Server to enter the license key and company name. You will need to call the register function at the beginning of any script that is going to call plugin functions. This will ensure that you do not get demo mode errors.
We love to hear your suggestions for improving our products! If you are experiencing problems with this plugin, or have a feature request, or are happy with it, we'd appreciate hearing about it. Send us a message on our website, or email us!
When calling plugin functions as script steps, you will handle errors in the same manner you would any other FileMaker script step. Please see the FileMaker documentation for how to handle errors appropriately. Generally, if there is an error, our plugins will return an error code of 1552 when Get(LastError) is called. However, some plugin functions will return different error codes. If a function can return an error code other than a 1552, it will be documented with the description of the function below. In addition to the error code, you can also get the description of the error by calling Get(LastExternalErrorDetail). Please note that if you are using FileMaker 19.6 or later then this function has been renamed to Get(LastErrorDetail)
You can also call our functions in a calculation dialog. In this case, error handling is done differently. If you decide to call plugin functions in a calculation dialog and you want to capture errors, see this page page for instruction on how to do so
You can select what type of FTP protocol you want to use by using one of the FTPeek_Connect methods. For regular unencrypted FTP, use FTPeek_ConnectFTP. You can also do SFTP with FTPeek_ConnectSFTP or FTPS with FTPeek_ConnectFTPS.
Once you're connected, the plugin functions to upload, download, etc. are the same for all three protocols.
More information about the FTP protocol, as well as the secure variations (SFTP and FTPS) can be found at this Wikipedia article.
This shows an example of connecting to a secure SFTP server, getting a list of files, and downloading one of them.
Step #1: Get public key of the server. This returns text that can be stored in FileMaker.
Set Field[ example::publicKey; FTPeek_GetPublicKey( "host.address.com" ) ] If[ example::publicKey = "ERROR" ] ...show error using FTPeek_LastError...
Step #2: Connect to the server. Requires public key and client authentication.
if[ FTPeek_ConnectSFTP( "host.address.com" ; example::publicKey ; "username" ; "password" ) = "ERROR" ] ...Handle error...
Step #3: Get a list of files in a directory on the server
Set Field[ example::filesList; FTPeek_GetFileList( "/Users/username/" ) ] if[ example::filesList = "ERROR" ] ...show error using FTPeek_LastError...
Step #4: Download the first file in the list to a temp directory and name it newFileName.
If[ FTPeek_DownloadFile( "/tmp/" ; GetValue( example::filesList; 1 );
"newFileName" ) = "ERROR" ] ...Handle error...
Step #5: Disconnect
If[ FTPeek_Disconnect = "ERROR" ]
...Display error message to user, but we don't need to do anything else...
All functions support referencing remote files and directories as relative or absolute paths.
A relative path references
files and directories starting from the current working directory. For example, if we are in the /uploaded/FTPeek/
directory on the remote
server, changing into backup
would navigate into the /uploaded/FTPeek/backup/
directory.
On the other hand, an absolute path
references files and directories starting from the root directory of the server. If we're in the same /uploaded/FTPeek/
directory and try to
change into /temp
, we would actually end up in /temp/
instead of /uploaded/FTPeek/temp/
, since we start at the root directory instead
of the current working directory.
As seen in the examples, an absolute path starts with a slash /
, while a relative one does not. Either
can be passed in to FTPeek_ChangeDir, FTPeek_Rename, FTPeek_UploadFile, and other functions to reference relative or absolute paths.
Here is an example illustrating how a login script would work for DropBox. It assumes there is a related table occurrence named 'currentUserRecord' where the login token for the current user can be read and written:
Set Variable[ $$state; Get( UUID ) ] Set Variable[ $loginUrl; FTPeek_DropboxGetLoginUrl( currentUserRecord::DropBoxToken; $$state ) ] If[ IsEmpty( $loginUrl ) ] #User tokens are still valid from last login; can auto-login without being prompted Set Field[ currentUser::DropBoxToken; FTPeek_ConnectDropbox( currentUserRecord::DropBoxToken; $$state ) ] #Proceed to make normal calls to the plug-in to list, read, and write files on DropBox Else #Need to redirect user to loginUrl Open URL[ $loginUrl ] #After they login, they should click a button in FileMaker that runs the post-login script, below #You can also show a dialog to pause the script and wait for them to press continue, instead of running a separate script. End IfPost-login script. Make sure $$state is the same UUID that was passed into the FTPeek_DropboxGetLoginUrl function
Set Field[ currentUser::DropBoxToken; FTPeek_ConnectDropbox( currentUserRecord::DropBoxToken; $$state ) ] #Proceed to make normal calls to the plug-in to list, read, and write files on DropBox
#Change dir using relative path. Current working directory is "/uploaded" FTPeekChangeDir[Remote Dir:"FTPeek"]//working dir is now "/uploaded/FTPeek"
#Change dir using absolute path. Current working directory is "/uploaded" FTPeekChangeDir[Remote Dir:"/FTPeek"]//working dir is now "/FTPeek"
remoteDir
- the directory to navigate into#Root directory is "/" Current working directory is /uploaded/FTPeek FTPeek_ChangeDirRoot // current directory is now "/"
# Current directory "/uploaded/FTPeek" FTPeek_ChangeDirUp // current directory is now "/uploaded"
# opens a File Chooser, showing only files, Window title is "Choose a file to upload" Set Variable[$choose; Value: FTPeek_ChooseFile("/User/SomeUser/Desktop";"files";"Choose a file to upload"]
fileType
without specifying initialPath
you'll need pass in an
empty string ""
for the initialPath
parameter.
initialPath
- optional path to set the initial dialog selection to. If empty, will default to the user's
home directory.fileType
- option parameter to specify whether to allow ,,"files",
,, ,,"directories",
,,
or both ,,"files + directories",
,.title
- optional title string to display as the title of the FileChooser dialog.Call this function AFTER FTPeek_DropboxGetLoginUrl, and after sending the user to the login URL (if a URL was returned by the GetLoginUrl function), or immediately (if a blank result was returned by the GetLoginFunction). After this function completes successfully, you should store the result in a user record for future logins, and then you can proceed to make normal function calls to interact with DropBox.
There is an OAuth example login process at the top part of this documentation.
tokenStore
- Every time this function is called, the result should be stored in the database and passed in as this parameter on the next call to this function.state
- This should match the random UUID that was passed to the ,FTPeek_DropboxGetLoginUrl, function.
"ActiveMode=true"
.
"encoding=UTF8"
.
FTPeek_ConnectFTP[Host:"ftp.mysite.com" ;Username:"username" ;Password:"password" ;ActiveMode:"true";Encoding:"UTF8"]
FTPeek_ConnectFTP[Host:"ftp.mysite.com" ;Username:"username" ; Password:"password"; ActiveMode: ; Encoding: ; Logging Level: "DEBUG"]
FTPeek_ConnectFTP[Host:"ftp.mysite.com" ;Username:"username" ;Password:"password" ;ActiveMode:"true";Encoding:"UTF8";Logging Level: ; Timeout: "30000"]
host
- address of the server; can be numeric IP address like ,,"127.0.0.1",
, or a named one
like ,,"ftp.mysite.com",
,; if need to connect to a non-standard port number, concatenate
the port number to the host name like ,,"ftp.mysite.com:21",
,.username
- the client username.password
- the client authentication password.args
- Additional optional arguments ,,ActiveMode,
,, ,,encoding,
,,
,,timeout,
,.Here is an example of connecting to FTPS server:
FTPeek_ConnectFTPS[Host:"ftps.mysite.com" ; Username:"username" ;Password:"password"]
"ValidateServerCertificate=false"
.Set Variable[$result; Value: FTPeek_ConnectFTPS("ftps.mysite.com" ;"username" ;"password" ;"ValidateServerCertificate=false")]
"ImplicitFTPS=true"
.Set Variable[$result; Value: FTPeek_ConnectFTPS("ftps.mysite.com";"username" ;"password" ;"ImplicitFTPS=true")]
"StartWithClearDataChannels=true"
.Set Variable[$result; Value: FTPeek_ConnectFTPS("ftps.mysite.com" ;"username" ;"password" ;"StartWithClearDataChannels=true")]
"ActiveMode=true"
.
"encoding=UTF8"
.
Set Variable[$result; Value: FTPeek_ConnectFTPS("ftps.mysite.com";"username";"password" ;"ActiveMode=true";"encoding=UTF8")]
Set Variable[$result; Value: FTPeek_ConnectFTPS("ftps.mysite.com" ;"username" ;"password" ;"DisableDataSslClosure=true" ;"DisableSslClosure=true")]
Set Variable[$result; FTPeek_ConnectFTPS("ftps.mysite.com" ;"username" ;"password" ;"LoggingLevel=DEBUG")]
host
- address of the server; can be numeric IP address like ,,"127.0.0.1",
, or a named one
like ,,"ftp.mysite.com",
,; if need to connect to a non-standard port number, concatenate
the port number to the host name like ,,"ftp.mysite.com:990",
username
- the client usernamepassword
- the client authentication passwordargs
- Additional optional arguments (,,ValidateServerCertificate, ImplicitFTPS, ActiveMode,
encoding, ssl flags, logging level (see examples),
,).FTPeek_ConnectS3(Region And Bucket:"us-east-1/static.360works.com";Access Key:"AmazonAccessKeyHere";Secret Key:"AmazonSecretKeyHere")]
regionAndBucket
- : This is the name of an S3 region, followed by a slash and the bucket name. For example,
to access the bucket static.360works.com in the Virginia region, you would specify
'us-east-1/static.360works.com'. Value values are:
,accessKey
- Your Amazon Web Services (AWS) access keysecretKey
- Your Amazon Web Services (AWS) secret key
FTPeek_ConnectSFTP[Host: "sftp.mysite.com" ;Host Public Key:"####Public Key####" ;Username:"username" ;Password:"password"]
Set Variable[$result; Value: FTPeek_ConnectSFTP("sftp.mysite.com" ;"####Public Key####" ;"username" ;"password";"LoggingLevel=DEBUG")]
In the above example FTPeek_ConnectSFTP is using public key authentication to connect to the server by passing in PublicKeyAuth=1 and PrivateKeyPath=/Users/username/.ssh/id_rsa as additional arguments. The password parameter in this case refers to the encryption password of the id_rsa file. In the event that your private key file does not have an encryption password you should pass in an empty string "" as the password parameter. If you are having trouble connecting with this method please ensure that your SSH server is configured to allow public key authentication, and that the client's public key is listed as an authorized key in the correct location on the server.
host
- address of the server; can be numeric IP address like ,,"127.0.0.1",
, or a named one
like ,,"ftp.mysite.com",
,; if need to connect to a non-standard port number,
concatenate the port number to the host name like ,,"ftp.mysite.com:21",
publicKey
- the unique key of the server, obtained by calling ,FTPeek_GetPublicKey,. If a wrong key
is entered, the connection will be refused and this error thrown: "The host signature is invalid
or the host key was not accepted!"username
- the client usernamepassword
- the client authentication passwordargs
- Additional optional arguments: ,,LoggingLevel,
,, ,,PublicKeyAuth,
,,
,,PrivateKeyPath,
,.
filePath
- - The filePath to the file for which a shareable link will be created.Here is an example:
FTPeek_DeleteDir[ Remote Dir: "Empty/Directory"] //relative path example ] FTPeek_DeleteDir( Remote Dir: "/home/files/Non empty directory" ; Recursive Flag: "true" ) //absolute path example]
remoteDir
- remote directory to deleterecursiveFlag
- optional parameter, specify ,,recursive=true,
, to enable recursive deleteHere is an example:
Set Variable [ $deleteFile ; Value: FTPeek_DeleteFile( "remoteFiles.txt" ) ] Set Variable [ $deleteFiles ; Value: FTPeek_DeleteFile( "remoteFiles.*" ; "wildcards=true" ) ]
remoteFile
- remote file path to deleteuseWildcards
- optional parameter, specify ,,wildcards=true,
, to enable wildcard characters
,,*,
, and ,,?,
, in the remote file name to delete matching files.FTPeek_DeleteLocal( Local File: "/Users/username/Desktop/upload.gif" ) ] FTPeek_DeleteLocal( Local File: "C:\\Documents and Settings\\username\\Desktop\\upload.txt" ) ]
localFile
- file on the local file system.
FTPeek_DownloadFile(Remote Source Path: "path/to/remote/file";Local Dest Path: "path/to/local/destination";New Local File Name: "myfile.txt"]
remoteSourcePath
- the file path on the remote FTP server to downloadlocalDestPath
- the directory on the computer running FileMaker Pro where the downloaded file should be
stored, for example ,,"/Users/Shared/Downloads/",
, or ,,"filemac:/Macintosh
HD/Users/Shared/Downloads/",
newLocalFileName
- an optional parameter that can be used to locally rename the downloaded file. If left
empty, the file will be named whatever it was named on the FTP server.FTPeek_SetTransferType( type )
. For example, this will download a Word
document from the FTP server and store it into a container field:Set Field[ example::ContainerField;FTPeek_DownloadFileToContainer("My report.doc") ]
remoteSourcePath
- the file path on the remote server to downloadSet Field[ example::TextField; FTPeek_DownloadFileToField("My File.txt") ]
remoteSourcePath
- the file path on the remote server to downloadencoding
- optional text encoding. Some of the supported encodings are ,,"ASCII", "ISO8859_1",
"UTF8", "UTF-16",
,, for more supported encodings consult ,,Java supported
encodings,, use the second column of the table as the encoding name.There is an OAuth example login process at the top part of this documentation.
tokenStore
- Can be empty the first time you call this. After a successful login, you should store the tokenStore returned from ,FTPeek_ConnectDropbox, and pass it in the next time this function is called. In most cases this will skip the need for the user to have to log in.state
- A random UUID. Store this UUID so that it can be passed as a parameter to ,FTPeek_ConnectDropbox,. The state parameter is required if calling the function on FileMaker Server, or with a Perform Script on Server, but it is legal to leave the state parameter empty if the plugin is running on FileMaker Pro.Set Field[myTable::Results; Value: FTPeek_ExecuteCommand("some valid command here")
temp
, calling the FTPeek_GetCurrentDir function will return
/temp/
.Set Variable[#currentDir; Value: FTPeek_GetCurrentDir()]
Set Variable[$info;Value: FTPeek_GetFileInfo("path/to/file";"size")//returns the size of the file
remotePath
- remote file path to get info for.infoType
- Can be either ,,size,
,, which returns the file size in bytes, or ,,moddate,
,,
which returns a Date field with the modification date of the file.Set Variable[$list; Value: FTPeek_GetFileList]//returns content of current working directory
Set Variable[$list; Value: FTPeek_GetFileList("/tmp"]//returns content of /tmp directory
remoteDir
- the path of the directory to look in, or empty for the current working directorySet Field[Settings::PubKey; FTPeek_GetPublicKey("sftp.mysite.com")]
host
- address of the server; can be numeric IP address like ,,"127.0.0.1",
, or a named one like
,,"ftp.mysite.com",
If [FTPeek_isConnected = 0] //if not connected FTPeek_ConnectFTP[Host:"ftp.mysite.com";Username:"username";Password:"password"]
"ERROR"
, call this function to get a user-presentable description of what went wrong. For
example,If[ FTPeek_ConnectFTP( "ftp.domain.com"; "username"; "password" ) = "ERROR" ] Show Custom Dialog[ "Could not connect to FTP Server: " & FTPeek_LastError ] Exit Script End If
Here is an example:
FTPeek_MakeDir[ Remote Dir: "New Folder"] //relative path example FTPeek_MakeDir[ Remote Dir: "/home/files/newDir" ) //absolute path example]
remoteDir
- remote directory path to create
licenseKey
- registration keyregisteredTo
- register to entityFTPeek_Rename(From:"/path/to/file.txt";To:"/path/to/newFile.txt"]
from
- old file name to rename fromto
- new file name to rename to
Set Field[ example::localFilesList; FTPeek_ScanLocalDirectory( "/Library/User Pictures/Animals", 0 ) ]
Butterfly.tif Cat.tif Dog.tif Dragonfly.tif Jaguar.tif Parrot.tif ...etc
Set Field[ example::localFilesList;FTPeek_ScanLocalDir( "C:\WINDOWS\Media"; 0 ) ]
chimes.wav chord.wav ding.wav flourish.mid notify.wav onestop.mid recycle.wav ringin.wav ringout.wav start.wav tada.wav town.mid ...etc
Directories will end in a '/' on Mac OS X or '\' on Windows.
localPath
- path of the local folder to scanisPathFromFileMaker
- Set to 1 if localPath is a FileMaker-style path, returned from a FileMaker path
function such as Get( DesktopPath ) or Get( TemporaryPath ). Set it to 0 if localPath
is a native operating system path. For example, the file-style path to the user's
desktop returned by Get( DesktopPath ) is '/Macintosh HD/Users/jesse/Desktop/', where
the normal OS X path would be '/Users/jesse/Desktop'.args
- an optional parameter which states whether or not files will be returned recursively.Set Variable[$errCap; Value: FTPeekSetErrorCapture(True)] //turns on error capture
errorCapture
- set to true to suppress the default popups.FTPeek_SetShowProgress[Show Progress Flag: 0 ]//turns off progress bars
showProgressFlag
- 0 to suppress progress bars, 1 to show progress bars.FTPeek_SetTransferType[Type: "Binary"]//sets the transfer type to Binary
FTPeek_SetTransferType[Type:"ASCII"]//sets transfer type to ASCII
type
- Set to ,,"ASCII",
, to transfer plain text data and files; set to ,,"BINARY",
, for
all non plain text data and files; set to ,,"DEFAULT",
, to have FTPeek resume making
automatic implicit decisions on the transfer type.Please see the note on relative and absolute paths at the top of the page for more information. localSourcePath can be a system specific file path or a URL. ( ex. http://serverAddress/sample.mov ).
Here is an example of how to upload a file into the current working directory on the FTP server, retaining the same name as the source file:
FTPeek_UploadFile( Remote Destination Path""; Local Source Path: "/Library/Desktop Pictures/Lines Blue.jpg"]
remoteDestPath
- remote file or dir path to upload to; will be created if directory structure does not
exist; if empty current working directory will be usedlocalSourcePath
- local file path to uploadFTPeek_SetTransferType( type )
. If the directory structure to upload to does
not exist on the remote server, it will be created as necessary. If the remote file name is not specified (
remoteDestPath ends with a '/' slash character ), the remote file will be named the same as the local file. Only
ASCII characters are supported for file names. The remoteDestPath path can be relative or
absolute.
FTPeek_UploadFileFromContainer ( Remote Dest Path: "/path/for/upload" ; Container to Upload: myTable::myContainer )]
remoteDestPath
- remote file or dir path to upload to; will be created if directory structure does not
existcontainerToUpload
- container data to uploadUntitled.txt
. Only
ASCII characters are supported for file names. The remoteDestPath path can be relative or
absolute. *Note that the default ftp transfer type is BINARYFTPeekUploadFileFromField(Remote Dest Path:"path/to/upload/myFile.txt"; Text Field to Upload: myTable::myTextField]
remoteDestPath
- remote file or dir path to upload to; will be created if directory structure does not
exist, will use current directory if empty.textFieldToUpload
- text data to uploadencoding
- optional text encoding. Some of the supported encodings are ,,"ASCII", "ISO8859_1",
"UTF8", "UTF-16",
,, for more supported encodings consult ,,Java supported
encodings,, use the second column of the table as the encoding name.