Web Integration
ExpeDat file downloads can be embedded into web pages, emails, PDFs, or anywhere else you can click a link. Users only need to download and run MTPexpedat one time to activate this feature. Web developers can follow the instructions below to create links directly, or use the EXP.js JavaScript API.
ExpeDat links are automatically activated the first time MTPexpedat is run. If a license code is required, it must be entered before links can be used. No server-side setup is needed: links work just like any other ExpeDat download.
Create an ExpeDat link just like you would any other URL, but instead of "http://" or "ftp://", you will use "expedat://".
expedat://server/path/file
Additional features can be activated using the GET query strings format, allowing you to specify encryption, compression, and user credentials. For example, to direct a new user to their ExpeDat home directory, you could email them a link like this:
expedat://abc.xyz//path/myfiles/?user=username
The formal syntax is as follows:
expedat://server[:port]/[/]path/file[/][?key=value&key=value...]
Here is a working example which, if you have a working copy of MTPexpedat, will download the file "test256kb.dat" from the folder "tst" on the server "dataexpedition.com", with encryption enabled:
expedat://dataexpedition.com/tst/test256kb.dat?encrypt=1
A complete list of available options is listed at the bottom of this page.
An end-user only needs to click on an embedded link to activate it. Users can also manually type ExpeDat links into their web-browser or save them as bookmarks. Links can be activated from the command line by typing "start expedat://..." in windows or "open expedat://..." in Mac OS X.
If MTPexpedat is not running when a link is activated, then MTPexpedat will start automatically. The operating system may ask for confirmation the first time this is done. If an instance of MTPexpedat is already running, the link will be passed to that instance instead of launching a new one.
Windows: If you have multiple MTPexpedat.exe instances installed, then the one you ran last will launch to service activated links.
Mac OS X: If you have multiple MTPexpedat.app instances installed, then the latest version on your local filesystem will launch to service activated links.
If one or more user prompts are are pending when a link is clicked, then the link will not execute until after all the prompts before it have been cleared. Likewise, if multiple links are activated, they will be processed in the order they are received by MTPexpedat.
Folder listings are performed immediately after any pending prompts, including any necessary authentication. File downloads will be placed at the end of the queue if other transfers are pending.
For security, files downloaded with ExpeDat links are always placed in the user's default folder.
ExpeDat links which do not specify a user name or password value will access the server anonymously. If the server does not support anonymous users, the transaction will fail.
Specifying a "user" or "pass" key with no value will cause MTPexpedat to prompt the user to enter their credentials. This is the best practice for security.
expedat://dataexpedition.com/tst/test256kb.dat?user=
If a user name is supplied, the user will be prompted to enter their password, and will have an opportunity to edit the user name.
expedat://dataexpedition.com/tst/test256kb.dat?user=joe
If both a user name and password are supplied in the link, then the user will not be prompted.
If multiple links require authentication at the same time, the user will prompted in the order they are activated.
Instead of initiating a download, an ExpeDat link can be used to simply take a user to a specific folder. This is accomplished by leaving off the file name. You must end the folder path with a forward slash.
expedat://dataexpedition.com/tst/
If no path is specified, the user will be taken to the applicable home directory.
expedat://dataexpedition.com/
Authenticated users who are not restricted to their home directory can be directed to absolute paths by placing an extra forward slash at the start of the path:
expedat://dataexpedition.com//absolute_path/
To reference the server root directory, use a tripple slash:
expedat://dataexpedition.com///
The following query keys may be used to configure a download. Remember to use proper URL encoding (such as using %20 for spaces), especially for user names or passwords which may contain special characters.
| user | Specify a username. If this key is present with no value, then the user will be prompted to enter a username. If a user name is given, but not a password, the user will be prompted to enter a password. |
| pass | Specify a password. If this key is present with no value, then the user will be prompted to enter a password. If a password is given, but not a username, the user will be prompted to enter a user name. For the best security, you should not place passwords in URLs. |
| encrypt | Specify whether to use encryption. Encryption will be disabled if the value is 0 and encryption is not already enabled in MTPexpedat. Under all other conditions, encryption will be enabled. |
| compress | Specify whether to use compression. If this key is present with a non-zero numerical value for a file download, then compression will be used for that download. Note that the compression checkbox will not be changed even though compression is being used for given download. |
Unrecognized keys will cause a warning to be displayed, but will otherwise be ignored. New keys will likely be introduced in future versions.