Connect Client offers many components to help you utilize Aspera file-transfer capabilities into your own web applications.  This guide will show you the basic of how Connect Client works and how you can utilize it in your own application.  The Connect Client JavaScript API allows you to build a fully branded and custom web application using your preferred framework, CMS or backend language.  The JavaScript handles connecting the user to the plugin which allows for the use of Aspera file-transfer.

You can easily add Connect Client to your existing web application or website.  In order to get started, it is important to understand the different files that make up Connect Client.

transferSpec contains all of the specifications that you define for your transfer.  These specs are passed to the server which uses them for generating the return JSON that allows the action to take place.  Below are some examples of the most commonly used setups.  For a list of all possible values please see the API docs.

For security reasons, source paths submitted to the Connect API for upload transfers (AW4.Connect#startTransfer) must be obtained either using the showSelectFileDialog/showSelectFolderDialogcalls or setDragDropTargets calls. That's the way to make sure that users are aware of the transfer happening between their host and the remote server.

Similarly, destination paths for downloads must follow the same approach if they are absolute paths (ie. if "use_absolute_destination_path" is set to true in connect_spec JSON).

Note: Aspera Connect does not have an overwrite boolean-type option (which would allow the user to change the overwrite policy), because each new transfer request overwrites the pre-existing files by default. However, you can back up existing files before they are overwritten; add the value, "save-before-overwrite": true to the JSON for the transferSpec before starting the transfer. See Download of Existing Files for additional details.

To take advantage of Aspera Connect's transfer features in your custom web applications, the Aspera plugin must be installed in the end users' browsers. This section demonstrates two Aspera plugin installation types; manual and automatic.

With Connect 3.6, there are new features available that you may want to consider taking advantage of. To utilize these new features Connect 3.6 includes a slightly modified version of the asperaweb JavaScript. Whereas the previous versions of the asperaweb JavaScript were named "asperaweb-2.js", the asperaweb JavaScript that includes the new features is in a file named "asperaweb-4.js". In Connect 3.6, web aplication developers have the option of using the older asperaweb-2.js API which maintains complete backwards compatability for existing applications.

With Connect 3.7, there are new features available that you may want to consider taking advantage of. To utilize these new features use the Connect 3.7 version of the "asperaweb-4.js" (or asperaweb-4.min.js) file.

Video player

Video

×