Software Venture Consulting

FileMaker Pro downloads & Resources
FileMaker Custom Functions
FileMaker Web Viewer Examples
FileMaker Pro & Lasso Consulting
Training
FileMaker Books
FileMaker Articles
FileMaker Error Reference

Free Web Tools
Free FileMaker Tools

Personal Pages
Videos
Adventures
Links

Shopping Cart
Shopping Cart

Search:

Free Newsletter
Signup


Contact


Privacy Policy



FileMaker is a registered trademark of FileMaker, Inc. in the U.S. and other countries.

 

 FileMaker Pro Custom Functions

List  |  Show Random  |  Upload  |  Add This to Your Site

FTPUpload ( URL ; user ; password ; directory ; file ; localdirectory ; localfile )

Rate this function:  

RatingRatingRatingRatingRating
  Average rating: 4.2  (48 votes)
  Discuss this Custom Function

Alan Deffenderfer, ABD Enterprises
http://www.abdenterprises.com

Function to Upload file using curl and applescript

Sample Input:
FTPUpload ( URL ; user ; password ; directory ; file ; localdirectory ; localfile )
Sample Output:
do shell script "curl -T /Users/yourhome/Desktop/yourlocalfile.txt ftp://user:password@ftp.yoursite.com/yourremotefile.txt"


 Then copy & paste into FileMaker Advanced's Edit Custom Function window.

Click here to copy To Clip Manager if you have myFMbutler's Clip Manager installed

Description:

Use the perform applescript script step with this function to perform ftp uploads. I use globals/variables that reference my paths/filenames and your username/password.

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

This is my Custom Function and I want to edit it

Discuss:

5 most recent comments | Show all 10 comments

How to Set globals/variables that reference your paths/filenames and username/password and pass to the function.

"do shell script \"curl -T '" &

Case( not IsEmpty( localdirectory );

localdirectory )

& localfile & "' ftp://" & user & ":" & password & "@" & URL & "/" &

Case( not IsEmpty(directory);

directory & "/")

& file & "\""

Bryan, USA
April 10, 2014 4:04am

It works great. Thanks!
Ingo

Ingo, Vienna/Austria
April 07, 2015 11:02am

I want to run this script/function scheduled on Filemaker Server. What needs to be done with the local directory for FMS to be able to access the file for upload. I am led to believe that FMS can not access the Desktop of the server for files.

Brian McIntosh, Korora
January 23, 2016 4:13pm

The best way to ensure that type of script using CURL under Applescript or Windows events works as expected is to use the Filemaker function GetAsURLEncoded () encode the inputs, then characters which are illegal in a URL will not stop your Curl command from functioning.

A second useful item when debugging CURL is this form which returns to you what the FTP server received:

curl --trace -n -v -ssl -l ftp://<username>:<password>@<svr IP address>/<folder>/<file.html>

In DeskspaceCMS, we trap for an error on upload and if one occurs we pass the output of this CURL command back to the user in a dialogue so they can work out where they went wrong.

Nick Lightbody: Sussex UK

Nick, Sussex UK
February 25, 2016 11:57am

I wrote this Mac Only custom function over ten year ago and posted almost that long ago. I'm glad some of you have found it helpful.

When I get some time in the coming weeks, I'll update it based on the comments above. Thanks for all the feedback.

Alan @ ABD

Alan Deffenderfer, Baltimore MD
February 25, 2016 4:52pm

Make a comment about this Custom Function (please try to keep it brief & to the point). Anyone can post:

Your Name:
City/Location:
Comment:
characters left. If you paste in more than 1500 characters, it will be truncated. Discuss the function - advertisements and other useless posts will be deleted.
Answer 1 + 9 =
Search for Custom Functions:

Custom Functions Widget
Download the Custom Function Dashboard Widget for OS X
Keep all the latest Custom Functions right at your fingertips!

Newest Custom Functions:

1. decFromHex ( hexValue )
  (Mon, Oct 16, 12:34pm)
2. MonthYearList ( startmonth ; startyear ; numbermonth ; short )
  (Mon, Oct 16, 3:38am)
3. ErrorDescription ( errorNumber )
  (Wed, Sep 27, 2:51am)
4. decodeEntities (text)
  (Wed, Sep 27, 1:22am)
5. HexidecimalToNumber ( HexidecimalValue ; counter )
  (Mon, Sep 25, 12:39pm)
6. FixedFieldConverter ( Fieldname ; f1 ; f2 ; f3 ; f4 ; f5 ; f6 ; f7 ; f8 ; f9 ; f10 ; f11 ; f12 ; f13 ; f14 ; f15 ; f16 ; f17 ; f18 ; f1
  (Fri, Sep 15, 12:34pm)
7. ShannonEntropy ( text )
  (Thu, Sep 07, 5:59am)
8. LetterCount ( text ; summary )
  (Thu, Sep 07, 5:53am)

RSS Feed of Custom Functions