span8
span4
Note: As of FME Server 2016,there is an SFTP Subscriber available.
After running a translation,you may want to upload your output to a secure server.SFTP(Secure File Transfer Protocol)is a protocol which can be used to transfer files securely to and from a remote computer.Popular uses of SFTP include:
At this time,a built-in method has not been developed to perform this type of file transfer within FME.However,we can use a very simple python shutdown script and the WinSCP SFTP client to complete this process.
The example workspace"generate_and_upload_using_WinSCP.fmw"contains a simple 亚搏在线workflow.It writes a text file to a user-specified directory and then the entire directory is uploaded to an SFTP server using WinSCP.To accomplish this,FME runs a shutdown Python script which invokes the WinSCP application and provides it with the information needed to complete the transfer.
#Command list - NOTE: Edit below to add correct WinSCP directory as well as the FTP username,password and host.eg: admin:admin@ftp.example.com command = ["C:\\Program Files (x86)\\WinSCP\\winscp.com","/command","option confirm off",“开放MYUSER:MYPASS@MYHOST","put " + fmeoutdir,"close","exit"]
Once the script has been edited,test the output and determine if it was uploaded to the SFTP server.The process should complete successfully with the output folder uploaded securely to your server.
You can now incorporate this 亚搏在线workflow into your own personal projects.
@bruceharoldThanks for the note Bruce.I've updated the article so that other are aware of the new functionality.
Setting up a workspace to deploy in production,staging and local
Using a Python Startup/Shutdown Script or PythonCaller to Perform Geoprocessing with Arcpy
Create Spatial Index after loading to ArcSDE - using Load only mode
Example 亚搏在线Workflow using FME,Python and Oracle
Published Parameter use within a Startup or Shutdown Script
Extracting a schema subset for dynamic schemas
Box.com - 3.Upload a File to a Directory
© 2019 亚搏在线Safe Software Inc |Legal