FileCatalyst cung cấp nhiều tùy chọn để tích hợp vào các ứng dụng bên thứ 3 và quy trình công việc. SDK của chúng tôi tự hào có đầy đủ các thành phần cho một loạt các ngôn ngữ và môi trường phát triển.

Yêu cầu thử nghiệm

component Công nghệ FileCatalyst sản phẩm
API khách hàng Java, C ++ *, iOS *, Android *, NET * Trực tiếp, Quy trình làm việc
Java Applet, JavaScript API Bất kỳ trình duyệt web gần đây với Java Plug-in Thẳng thắn
Quản lý từ xa Java, REST Trực tiếp, Quy trình làm việc
CLI / Shell Scripting Dòng lệnh* Trực tiếp, Quy trình làm việc
C ++ API / CLI Non-Java Command Line & API Thẳng thắn

* Chuyển đến và đi từ Quy trình làm việc và chỉ Webmail khu vực File.

Bộ công cụ phát triển là nền tảng của sản phẩm của chúng; nếu bạn sở hữu bất kỳ sản phẩm đủ điều kiện, các Development Kit có thể được cấp phép như là một add-on. Đối với phát triển độc lập, SDK thường thêm vào FileCatalyst trực tiếp; Tuy nhiên, một số thành phần được thiết kế để tương tác với FileCatalyst Workflow.

Xem SDK Webinar

Download accompanying mã nguồn ví dụ ở đây

API khách hàng

Our well-documented API gives access to every method needed to establish a connection to a FileCatalyst Server for accelerated file transfers. With a few short lines of code, you can be underway. Default values are used for most functions, with a full range of method calls allowing you to access advanced features.

Các ứng dụng khách API cũng cho phép bạn lập trình trình công việc và các tập tin để FileCatalyst Workflow hoặc Webmail.

nhập unlimited.fc.client.api. *; import java.io. *; public class UploadSample {public static void main (String args []) throws Exception {FCClient fc = FCClient mới ( "192.168.1.30", 21); fc.setShowConsoleLog (true); fc.initialize (); fc.connect (); fc.login ( "vô danh", "me@email.com"); fc.setMode (TransferMode.UDP); // Thiết lập tốc độ bắt đầu và nhắm mục tiêu tỷ lệ giống nhau. Nó sẽ làm chậm nếu ùn tắc gặp phải. fc.setStartRate (10000); fc.setTargetRate (10000); fc.setVerifyIntegrity (true); TransferHook upload = fc.upload (new File ( "c: /temp/500MB.zip")); while (! upload.isTransferComplete ()) {// bạn có thể hiển thị một số thông tin tiến bộ ở đây bằng cách sử dụng phương pháp khác nhau trong // đối tượng TransferHook if (upload.getStatusCode () == upload.TRANSFERRING) {System.out.println (upload .getPercent () + "% "+ upload.getRate () +" Kbps"); } Try {Thread.sleep (1000); } Catch (InterruptedException ex) {}} // ngắt kết nối từ các máy chủ fc.disconnect (); // dọn dẹp fc.finish (); }}
import unlimited.fc.client.api.*;
import java.io.*;
import java.util.*;
import java.util.Observable;
import java.io.IOException;
import unlimited.fc.com.FCException;

/**
 * This example illustrates the use of Observables to monitor a TransferHook object.
 */

public class UploadSampleAdvanced implements Observer {

  TransferHook upload = null;

  public void go() throws IOException, FCException {

    FCClient fc = new FCClient("192.168.1.30", 2057);
    fc.setShowConsoleLog(true);
    fc.initialize();
    fc.connect();
    fc.login("anonymous", "me@email.com");

    // Let's auto detect the transfer mode.  Unless RTT is high enough, FTP gets used.
    fc.setMode(TransferMode.AUTO);

    // lets send at a constant 1500 Kbps, no congestion control.
    // the congestion control only comes into play if FC gets detected as the best transfer mode
    fc.setUseCongestionControl(false);
    fc.setTargetRate(1500);

    // verify the file afterwards
    fc.setVerifyIntegrity(true);
    upload = fc.upload(new File("c:/bigfiles/500MB"));
    upload.addObserver(this);

    try {
      synchronized (this) {
        wait();
      }
    }
    catch (InterruptedException ex) {
    }

    // disconnect from the server
    fc.disconnect();

    // clean up
    fc.finish();
  }

  public void update(Observable observable, Object object) {

    if (!upload.isTransferComplete() && !upload.isTransferCancelled() &&
        !upload.isTransferError()) {
      if (upload.getStatusCode() == upload.TRANSFERRING &&
          upload.getCurrentPercent() != 100) {
        printProgress(upload.getRate(), upload.getCurrentPercent());
      }
      else if (upload.getStatusCode() == upload.DONEFILE) {
        printProgress(upload.getRate(), 100);
      }
    }
    else {
      // all files complete
      synchronized (this) {
        notifyAll();
      }
    }
  }

  public void printProgress(int rate, int percent) {
    System.out.println(percent + "%");
    System.out.println(rate + " kbps");
  }

  public static void main(String args[]) throws Exception {
    new UploadSampleAdvanced().go();
  }
}

Server API

Các Java Server và REST API tiếp xúc với tất cả các phương pháp cần thiết để quản lý người dùng và phiên yêu cầu thông tin về FileCatalyst Server.

// Example below is sample code in which the application tries to create a user and
 // wraps up logic for reconnection attempts should the communication between the ServerAPI
 // and the Server be severed.

 // Call to setup initial connection to FileCatalyst Server
 public void init() throws Exception {
   FCServer fcserver = new FCServer();
   // connection parameters
   fcserver.setHostname("localhost");
   fcserver.setPort(12400);
   fcserver.setUserName("admin");
   fcserver.setPassword("system");
   // connect
   fcserver.connect();
 }

 // attempts a reconnection
 private void reconnect () throws Exception {
   try {
     fcserver.disconnect();
   } catch (Exception e) {
   }
   fcserver.connect();
 }

 //
 // Method to modify login credentials for a user.  If the user does not yet exist, create the
 // user as well.
 // @param fcUserName FTP Login name
 // @param fcPassword Password the user wants to have
 // @throws Exception If you cannot connect to the server after 3 attempts, or the server is not allowing you to
 //                   create/modify the user.
 //
 public void createOrModifyUserCredentials(String fcUserName, String fcPassword) throws Exception {
   // Get the FileCatalyst user.
   int MAXATTEMPTS = 3;
   UserContainer fcUser = null;
   int retryAttempts = 0;
   while (fcUser == null && retryAttempts < MAXATTEMPTS ) {
     // try to connect if we've lost the connection
     if (!fcserver.isConnected()) {
       reconnect();
     }
     try {
       fcUser = fcserver.getUser(fcUserName);
       if (fcUser == null) {
         // null return indicates user does not exist -- create
         fcserver.addUser(fcUserName, fcPassword);
         // test to see if the user is really there
         fcserver.resynchConfigurationFiles();
         fcUser = fcserver.getUser(fcUserName);
         if (fcUser == null) {
           throw new Exception("FileCatalyst user could not be created with user name '" + fcUserName + "'");
         }
         return;
       } else {
         fcserver.modUserPassword(fcUserName, fcPassword);
         return;
       }
     } catch (AdminConnectionException e) {
       // conection foobared.  Let's try again
       retryAttempts++;
     }
   }
   throw new Exception("Cannot connect to FCServer, reached max attempts");
}

API Mobile

Easily create fast file transfer apps for Apple iOS and Google Android. FileCatalyst provides a native Objective-C API for iOS and a Java API for Android Dalvik.

Được xây dựng bằng cách sử dụng API thoại di động, ứng dụng FileCatalyst của chúng tôi bây giờ đã có cho Android
iOS.

//
//  FCAViewController.m
//  example
//
//  Copyright (c) 2012 Unlimi-Tech Software Inc.. All rights reserved.
//
//  This sample code will upload and then download a file named
//  "nature-q-c-320-320-7.jpg" (bundled with the SDK)

#import "FCAViewController.h"
#import "NSString+FCAUtils.h"

@interface FCAViewController ()

@property (strong, nonatomic) FCAControl *control;

@end

@implementation FCAViewController
@synthesize connectionStatusLabel;
@synthesize connectionDetailLabel;
@synthesize transferStatusLabel;
@synthesize transferDetailLabel;
@synthesize cancelButton;
@synthesize downloadButton;
@synthesize uploadButton;
@synthesize connectButton;
@synthesize control;


- (void)reportError:(NSError*)error {
    if (!error) return;

    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
                                                    message:error.localizedDescription
                                                   delegate:nil
                                          cancelButtonTitle:@"OK"
                                          otherButtonTitles:nil];
    [alert show];
}

// Basic file upload. The control instance has its own private work queue that all commands (except cancelTransfer) must
// be executed on. To do this, there are two helper methods, performBlock:completion: and performBlockAndWait:
// If any command inside the block fails, it will be reported in the NSError instance passed to the completion block,
// or returned from the performBlockAndWait: call.

- (IBAction)uploadAction:(id)sender {
    [self.uploadButton setTitle:@"Uploading..." forState:UIControlStateNormal];
    self.uploadButton.enabled = NO;

    [self.control performBlock:^{
        NSString *filename = @"nature-q-c-320-320-7.jpg";
        NSURL *fileURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:@"nature-q-c-320-320-7" ofType:@"jpg"]];

        [control uploadFile:fileURL toPath:filename transferStarted:^(FCAFileTransferStats *stats) {
            // this callback is invoked on the main queue
            self.transferStatusLabel.text = filename;
            self.cancelButton.hidden = NO;
            NSLog(@"transfer has started");
        } transferCompleted:^(FCAFileTransferStats *stats) {
            // this callback is invoked on the main queue
            NSLog(@"transfer has completed");
            self.transferStatusLabel.text = [NSString stringWithFormat:@"%@ finished", filename];
            self.cancelButton.hidden = YES;
        }];

    } completion:^(NSError *error) {
        [self reportError:error];
        [self.uploadButton setTitle:@"Test Upload" forState:UIControlStateNormal];
        self.uploadButton.enabled = YES;
    }];
}

- (IBAction)downloadAction:(UIButton *)sender {
    [self.downloadButton setTitle:@"Downloading..." forState:UIControlStateNormal];
    self.downloadButton.enabled = NO;

    [self.control performBlock:^{
        NSString *filename = @"nature-q-c-320-320-7.jpg";
        NSURL *documentsDirectory = [[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory
                                                                            inDomains:NSUserDomainMask] lastObject];
        NSURL *fileURL = [documentsDirectory URLByAppendingPathComponent:filename];

        [control downloadFile:filename
                        toURL:fileURL
              transferStarted:^(FCAFileTransferStats *stats) {
                  self.transferStatusLabel.text = filename;
                  self.cancelButton.hidden = NO;

              } transferCompleted:^(FCAFileTransferStats *stats) {
                  self.transferStatusLabel.text = [NSString stringWithFormat:@"%@ finished", filename];
                  self.cancelButton.hidden = YES;
              }];
    } completion:^(NSError *error) {
        [self reportError:error];
        [self.downloadButton setTitle:@"Test Download" forState:UIControlStateNormal];
        self.downloadButton.enabled = YES;
    }];
}

// This method shows how to use the nonblocking connect/disconnect calls
- (IBAction)connectAction:(UIButton *)sender {
    if ([self.control isConnected]) {
        sender.enabled = NO;
        [sender setTitle:@"Disconnecting..." forState:UIControlStateNormal];

        [self.control performBlock:^{
            [self.control disconnect];
        } completion:^(NSError *error) {
            sender.enabled = YES;
            [self reportError:error];
        }];
    } else {
        sender.enabled = NO;
        [sender setTitle:@"Connecting..." forState:UIControlStateNormal];

        [self.control performBlock:^{
            [self.control connect];
        } completion:^(NSError *error) {
            sender.enabled = YES;
            [self reportError:error];
        }];
    }
}

- (IBAction)cancelAction:(UIButton *)sender {
    [self.control cancelTransfer];
}


- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // create an FCAControl instance and set the connection options
        self.control = [[FCAControl alloc] init];
        self.control.username = @"user";
        self.control.password = @"test";
        self.control.hostname = @"10.0.1.2";
        self.control.port = 8123;

        // some options that are not required to set
        control.useSSL = NO;
        control.autoResumeEnabled = NO;
        control.fileExistsOverride = YES;
    }
    return self;
}

- (void)configureControlStats {
    self.connectionDetailLabel.text = [NSString stringOfTransferRate:self.control.bitsPerSecondAverageTransferRate];
}

- (void)configureView {
    NSString *connectionStatus = nil;

    if ([self.control isConnected]) {
        [self.connectButton setTitle:@"Disconnect" forState:UIControlStateNormal];
        self.uploadButton.hidden = NO;
        self.downloadButton.hidden = NO;
        connectionStatus = @"connected";
    } else {
        [self.connectButton setTitle:@"Connect" forState:UIControlStateNormal];
        self.uploadButton.hidden = YES;
        self.downloadButton.hidden = YES;
        connectionStatus = @"not connected";
    }

    self.connectionStatusLabel.text = [NSString stringWithFormat:@"%@:%d (%@)",
                                       self.control.hostname, self.control.port, connectionStatus];
}

- (void)viewDidLoad
{
    [super viewDidLoad];

    // there are notifications for the connect and disconnect events
    [[NSNotificationCenter defaultCenter] addObserverForName:FCAControlConnectedKey
                                                      object:self.control
                                                       queue:[NSOperationQueue mainQueue]
                                                  usingBlock:^(NSNotification *note) {
                                                      [self configureView];
                                                  }];

    [[NSNotificationCenter defaultCenter] addObserverForName:FCAControlDisconnectedKey
                                                      object:self.control
                                                       queue:[NSOperationQueue mainQueue]
                                                  usingBlock:^(NSNotification *note) {
                                                      [self configureView];
                                                  }];

    // during transfers, the Control instance will periodically send out a notification with updated
    // connection statistics
    [[NSNotificationCenter defaultCenter] addObserverForName:FCAControlUpdatedKey
                                                      object:self.control
                                                       queue:[NSOperationQueue mainQueue]
                                                  usingBlock:^(NSNotification *note) {
                                                      [self configureControlStats];
                                                  }];


    [self configureView];
}

- (void)viewDidUnload
{
    [self setConnectionStatusLabel:nil];
    [self setConnectionDetailLabel:nil];
    [self setTransferStatusLabel:nil];
    [self setTransferDetailLabel:nil];
    [self setCancelButton:nil];
    [self setDownloadButton:nil];
    [self setUploadButton:nil];
    [self setConnectButton:nil];
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    } else {
        return YES;
    }
}

@end

For Dalvik code, please see the API khách hàng sample.

HotFolder REST API

The HotFolder REST API exposes methods to add new watch folders, add new sites, and create/manipulate/execute tasks.

 

TransferAgent JavaScript và REST API

The TransferAgent JavaScript and REST APIs allow for tight integration with any web application.  It allows web applications to access/browse the local file systems, add files to a queue, initiate and monitor ongoing file transfers.  All of this can be done though JavaScript, or directly through REST calls.

 

Trung REST API

The FileCatalyst Central API provides access to all reporting data for all connected nodes, and also acts as a reverse HTTP proxy to access the REST APIs of individual connected nodes, like Server, HotFolder and TransferAgent (coming in v3.7).

 

Quy trình làm việc REST API

A RESTful API for FileCatalyst Workflow exposes a number of management functions through the web. These include:

  • Thêm / Sửa / Xóa người dùng
  • Thêm / Sửa / Xóa các nhóm
  • Thêm / Sửa / Xóa hình thức tự
  • Thêm / Sửa / Xóa FTP Sites
  • Danh sách Gióp Fields

NET Wrapper

The .NET wrapper offers transparent and thread-safe access to the FileCatalyst command-line in .NET. One potential application is to use
FileCatalyst technology to develop within the Microsoft development framework. The .NET wrapper requires an official Java runtime and FileCatalyst CLI.

bấm vào để xem mẫu ảnh chụp màn hình

Giao diện dòng lệnh

Using the CLI, access FileCatalyst functionality through virtually any scripting language, or from many other programming languages. Any tool able to output to the command line can be used to trigger FileCatalyst file transfers.

Thư viện Native Client C ++

FileCatalyst products are built using Java as the main programming language. This has always
allowed us to keep a centralized code base and be compatible across multiple platforms and browsers
(via Java Applet Plugin). 95% of systems (desktop/laptop/servers) found on the market today, including
Windows, MacOSX, Linux, Solaris, and AIX, can utilize our existing software.

However, there are certain systems where Java is not available. In many set top boxes and embedded systems
(network appliance, gaming consoles), Java is not installed or available. This ecosystem was unable to take
advantage of our solutions.

In light of this, we have developed a C++ client solution. Available as both a native C++ API or as a native
command-line executable (.exe for Windows, 32 or 64-bit binary for Linux), our FileCatalyst C++ client will
allow file transfer acceleration on systems that do not have Java installed.

 

C ++ Webinar

#include <FileCatalyst.hpp>

void example( const std::string &serverIpOrHostname, 
              const std::string &username, 
              const std::string &password )
{
    // Set a few options needed by fc::Control so it knows how to behave.
    fc::Options options;
    options.setFtpServer( serverIpOrHostname, 21 );
    options.setUsernameAndPassword( username, password );
    options.setMd5Verification( true );
    options.setMode( fc::kUdp );
    // Create the FTP fc::Control object.  Once it is created, the
    // fc::Options object is no longer required and can go out-of-scope.
    fc::Control ftp( options );
    // Connect to the server with the options originally provided by
    // fc::Options.  If connect() is not explicitly called, then the
    // connection is deferred until a method is called which needs to
    // communicate directly with the server.
    ftp.connect();
    // Note that even after a connection has been established, many (but
    // not all) FTP settings can still be modified.
    fc::Options newOptions = ftp.getOptions();
    newOptions.setBandwidth( fc::k100_Mbps );
    ftp.setNewOptions( newOptions );
    // Download some files from the server.
    ftp.prepareRecursiveDir( fc::Remote("/project"), fc::Local("/tmp") );
    ftp.download();
    ...
}

We have currently ported the library to the following platforms:

    • Windows 32-bit
    • Windows 64-bit


  • Linux 64-bit (.deb)
  • Linux 64-bit (.rpm)
  • Linux ARM 7 32-bit (.deb)
  • Linux ARM 7 32-bit (.rpm)
  • OSX 64-bit

Nếu bạn cần một cổng vào một nền tảng cụ thể, liên hệ với các chi tiết.

Yêu cầu thử nghiệm