magicVORTEX
  Home     Send Files     Pickup Files     My Account     Community     More Info  
 Developers' Guide
Last Updated: September 24, 2003
There are three methods for integrating the magicVORTEX File Transfer Service into your own solution.
  1. magicVORTEX application command line syntax
  2. Vortex Transfer Agent COM object
  3. magicVORTEX HTTP API

Click here for additional information regarding licensing and pricing.

magicVORTEX application command line syntax

Description

Many ISVs use the magicVORTEX Windows client application to facilitate reliable file transfers in their own applications. The magicVORTEX application is installed along with your application. A shell statement is used to run the command listed in the block below.

Sample

An example of this usage is:

magicVORTEX.exe C:\Path\FileToSend.dat /to:recipient@abc.com /s


The complete command-line syntax is as follows:

magicvortex.exe [<file1> [... <fileN>] [/to:<email>] [/c]] [/s] | [/quit]

<file>
(Optional) This parameter is the filename (or the complete path and filename) of the file being sent. Multiple files should be delimited with one space. When this parameter is not specified, then the application will launch without initiating any new file transfers.

/to:<email>
(Optional) This parameter is the recipient's email address. Multiple email addresses should be delimited with one semi-colon only (no spaces). When this parameter is not specified, the application will prompt the sender to provide recipient information via an interactive dialog window.

/c
(Optional) This option turns on the email confirmation flag for the sent file(s).

/s
(Optional) This option causes the entire operation to occur silently (i.e., the application will not be activated and/or restored).

/quit
(Optional) This option overrides all others, and will cause the application to exit immediately.

When run from the command-line, the magicVORTEX application exits with the following error levels:

0 = Success.
1 = Error: Default error or Transfer Agent could not be initialized.
2 = Error: Bad/invalid credentials.
3 = Error: Bad/invalid file.
4 = Error: Failure during file send.

Pros

  • Easy to implement
  • Works transparently with other user-initiated transfers

Cons

  • Microsoft Windows only
  • The magicVORTEX application needs to be installed
  • Configuration is managed within the magicVORTEX application
  • Automation features for send operations only

Vortex Transfer Agent COM object

Description

A magicVORTEX COM component is used to create a fully integrated solution. This also requires distributing the TransferAgent.dll file from the magicVORTEX application.

Sample

To setup:

Dim vta As New Vortex.TransferAgent
vta.SetConfigFile "C:\YourConfigFile.xml"
vta.AccountAddress = "sender@abc.com"
vta.Password = "password"
vta.Start()


To send files:

vta.SendFile("C:\Path\FileToSend.dat", "recipient@abc.com", _
  "file description", False)


To receive files:

Private Sub vta_IncomingFileEnd(ByVal FileObj As Vortex.VortexFile) _
  Handles Vortex.TransferAgent.IncomingFileEnd
 
  If FileObj.Status = vtaStatusReadyToSave Then
    FileObj.Save("ReceivedFile.dat")
  End If
 
End Sub


Pros

  • All magicVORTEX features are available programatically
  • Event driven operation

Cons

  • Microsoft Windows only
  • The magicVORTEX application needs to be installed
  • Requires a COM-compliant programming language

magicVORTEX HTTP API

Description

An HTTP-based web service is used for sending files from your application directly. This approach takes more programming effort but can result in a completely automated, integrated system. Since HTTP-based communication libraries are available for most modern development environments, no additional software is required on the client workstation. The sample code below is written in Visual Basic.NET using the WebRequest class.

Specifications are available online at:
  http://magicvortex.com/httpapi/1/dispatch.vortex?Action=Help

Sample

To send files:

Imports System.IO
Imports System.Net
Imports System.Xml
Imports System.Web	
...
Dim URL As String
Dim myWebRequest As WebRequest
Dim myFileStream As FileStream
Dim myReader As BinaryReader
Dim myWriter As BinaryWriter
Dim byteBuffer(9999) As Byte
Dim intBufferSize As Integer
 
URL = "https://magicvortex.com/HTTPAPI/1/dispatch.vortex?Action=Send" & _
  "&Filename=FileToSend.dat&Recipients=recipient@abc.com"
 
myWebRequest = WebRequest.Create(New Uri(URL, True))
myWebRequest.Method = "POST"
myWebRequest.Timeout = 36000000
myWebRequest.PreAuthenticate = True
myWebRequest.Credentials = New NetworkCredential("sender@abc.com", _
  "password")
 
myFileStream = New FileStream("C:\Path\FileToSend.dat", FileMode.Open, _
  FileAccess.Read, FileShare.Read)
myReader = New BinaryReader(myFileStream)
 
myWebRequest.ContentLength = myReader.BaseStream.Length
myWriter = New BinaryWriter(myWebRequest.GetRequestStream())
 
Do
  intBufferSize = myReader.Read(byteBuffer, 0, 10000)
  If intBufferSize > 0 Then myWriter.Write(byteBuffer, 0, intBufferSize)
Loop While intBufferSize > 0
myWriter.Close()
myReader.Close()


Pros

  • Works on any platform
  • Both sending and receiving files are supported
  • No software is required on user's computer (i.e., "zero footprint")

Cons

  • No "facilitated streaming" (i.e., sending must complete without interruption before receiving can commence)
  • Complex implementation

Licensing & Pricing

Licensing costs are covered by the standard magicVORTEX subscription plans. Integrating and distributing the magicVORTEX software is free of charge, but each sender needs an active subscription plan in order to send files. Any distribution of the magicVORTEX application must be performed with the original, unmodified installation package.

Visit the pricing page to read about the currently available subscription plans.

For more information, please inquire via email .
Is transferring files taking up too much bandwidth when you're working on other things? By changing the Transfer Rate, you can throttle down the magicVORTEX application to save more speed for other activities.