AdobeBridgeCS5SDK

Class AsynchronousFTP

Object
   |
   +--AsynchronousFTP

class AsynchronousFTP


Sample that shows hows to upload files asynchronously from Adobe Bridge to an FTP server; to run this, you must modify the code and supply FTP settings to access your own 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. Ensure the FTP settings match your FTP server configuration
  2. Ensure local and remote files and paths are correct
  3. Make sure Adobe Bridge is running
  4. In ExtendScript Toolkit set Target > Adobe Bridge CS5
  5. Run this snippet. At this point, a context-sensitive menu item and handlers have been created, and if you select one or more files, you can see a new menu item added by this sample.
  6. Ensure the file to upload is large enough to take some time before the upload is complete
  7. In Bridge, select the thumbnail for the file to upload, Right click > "SDK Asynch FTP: Upload". You can select multiple files if you wish but folders are ignored.

Description

This sample shows how to create an asynchronous FTP connection. A file is uploaded to the FTP server, whilst still leaving control with the scripting environment of Bridge; this means that Bridge is still responsive to the end-user when the file is being uploaded to the FTP server. A callback function is used to determine when the upload operation is complete.

See:

Defined in AsynchronousFTP.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 - this must be populated for the sample to function correctly.
 String ftpDir
          The directory where uploaded files will be stored.
 String ftpPassword
          The ftp password - this must be populated for the sample to function correctly.
 String ftpUsername
          The ftp username used to connect to the FTP server - this must be populated for the sample to function correctly.
 String requiredContext
          The context in which this snippet can run.
 
Constructor Summary
AsynchronousFTP()
           
 
Method Summary
 Boolean canRun()
           Determines whether snippet can be run given current context.
 Boolean run()
           Functional part of this snippet.

Field Detail

ftpAddress

String ftpAddress

ftpDir

String ftpDir

ftpPassword

String ftpPassword

ftpUsername

String ftpUsername

requiredContext

String requiredContext

Constructor Detail

AsynchronousFTP

AsynchronousFTP()

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