AdobeBridgeCS5SDK

Class BasicFTP

Object
   |
   +--BasicFTP

class BasicFTP


Shows how to upload and download files to and from an FTP server.

Usage

You must edit the FTP settings within this code; the code as shipped does not provide any default values for these settings and if you do not edit the FTP settings in the code (see "FTP server configuration" below), then the code will not run correctly. For the sample to execute correctly, you need access to an FTP server.
  1. Customize the FTP settings in the code to match your FTP server configuration.
  2. Run the snippet in the ExtendScript Toolkit, with Adobe Bridge CS5 as the target (see Readme.txt)
  3. In Adobe Bridge, navigate to a folder that has some files to upload
  4. Right-click the thumbnail for a file you wish to upload and choose "SDK Basic FTP: Upload file(s)"
  5. Right-click the thumbnail for the file you uploaded and choose "SDK Basic FTP: Download files" to download the same file.

Description

This code shows how to connect to an FTP server using the FTP object, then use the object to upload files to the FTP server from Bridge, and download files from the server to Bridge. This sample uses a synchronous connection, which blocks the main thread, so it is best to choose small files to transfer. For a demonstration of an asynchronous connection, see AsynchronousFTP.jsx

You must customize the specific values for the FTP server, passwords, directories and files to match your FTP settings and file system. You must upload at least one file before attempting to download a file.

See:

Defined in BasicFTP.jsx


Field Summary
 String ftpAddress
          The FTP server address to which you want to upload, which you must change to an FTP server to which you have access.
 String ftpDir
          The directory where uploaded files are stored on the FTP server.
 String ftpPassword
          The ftp password.
 String ftpUsername
          The ftp username used to connect to the FTP server.
 String requiredContext
          The context in which this snippet can run.
 
Constructor Summary
BasicFTP()
           
 
Method Summary
 Boolean canRun()
           Determines whether snippet can be run given current context.
 Boolean run()
           Functional part of this snippet, creates the FTP object, and connects to the FTP server.

Field Detail

ftpAddress

String ftpAddress

ftpDir

String ftpDir

ftpPassword

String ftpPassword

ftpUsername

String ftpUsername

requiredContext

String requiredContext

Constructor Detail

BasicFTP

BasicFTP()

Method Detail

canRun

Boolean canRun()

run

Boolean run()

AdobeBridgeCS5SDK

http://www.adobe.com/devnet/bridge
Documentation generated by JSDoc on Tue Apr 27 10:21:34 2010