ExpeDat User Links

The easiest way for someone to download or upload a specific file using your ExpeDat server is to send them a link.  The ExpeDat User Links page provides a novice-friendly way to share ExpeDat resources using common http:// URLs.  It allows you to present custom branding and instructions, give new users a chance to download the ExpeDat client, and ensures compatibility with non-standard email readers.

The User Links page acts as a landing and redirect page by converting http:// URLs into expedat:// URLs.  Links can be made very short by setting default values.  No plugins or Java are required.  End-users must download an ExpeDat client, which can be done from the Links page.  Implementing ExpeDat User Links requires the following:

It is not necessary for the web server and ExpeDat server to be running on the same machine and they do not need to share any files or folders.

User Links Interface

User LInks Interface

The screenshot above shows an example of what a user might see after clicking an ExpeDat User Link with default settings.  Nearly everything above can be customized in both form and function.  The logo at the top can be replaced with your own graphic.  The page title, header, and message can be replaced with your own text.  The "Home", "Support", and "Download Client" links in the menu bar can (and should) be directed to your own server.  You can insert your contact email address and phone number at the bottom.

The center of the page shows client installation instructions for first time users.  At the bottom of the page is an expedat:// URL which will activate the ExpeDat client and perform the action.

Installation

The explink.php file can be found in the "Web" folder of the ExpeDat distribution package.  Copy this file to your web server and place it in a linkable location.  Do not place it in a folder you will be sharing via ExpeDat.  You can rename explink.php however you want.

Open this copy of explink.php in a text editor.  All of the settings needed to customize the page are at the top of the file.  All of the necessary information can be provided in the http://URL which you will send to end-users.  But filling in as much information as you can here will help reduce the size and complexity of the links you send.  Type desired values inside the quote marks.  For example:

$ExpeDat_Server = "exp01.example.com:8080"; $ExpeDat_Username = "web"; $ExpeDat_Password = "none";

By default, the end-user will be prompted to enter an ExpeDat username and password when the click on the ExpeDat link.  You can avoid this prompt by setting $ExpeDat_Username and $ExpeDat_Password similar to the example above.

Creating User Links

To create an ExpeDat User Link, first create an expedat:// URL and then append it to the URL of the explink.php page with a question mark in between.  For example:

http://www.example.com/explink.php?expedat://exp01.example.com:8080/test1mb.dat?u=web&p=&e=1&c=0

Note that this URL contains two question marks.  The first question mark separates the "http://" server and path from the "expedat://" server and path.  The second question mark separates any options you are specifying such as a username or encryption.

You can make your URL much shorter by leaving out portions which refer to default values.  For example, if your ExpeDat server is the same as your web server, you can leave out the "expedat://server" portion:

http://www.example.com/explink.php?test1mb.dat?u=web&p=&e=1&c=0

You can make it shorter still by presetting values in the explink.php file as described above:

$ExpeDat_Server = "exp01.example.com"; $ExpeDat_Username = "web"; $ExpeDat_Encrypt = "1"; $ExpeDat_Compress = "0";

With these settings, a download link could be reduced to this:

http://www.example.com/explink.php?test1mb.dat

If you want to prompt a user to upload a file, using otherwise default targets, it might look like this:

http://www.example.com/explink.php??a=s

Notice that the link above contains two question marks.  The first specifies that we are using the default server and path, while the second marks the beginning of options.  In this case, the option is a "Send" action.

Only uploads, downloads, and folder listings are supported by User Links.  File maintenance actions such as creating a folder, deleting a file, or renaming a file are not currently supported by this mode.

Customization

The "$ExpeDat_" settings in explink.php act as defaults allowing you to create short User Links.  They can be overridden by adding the appropriate information back to the User Link.  The other settings allow you to customize the page itself.

$ExpeDat_Server The DNS name or IP address of the default ExpeDat serverand its port number.  For example: "exp01.example.com:8080".
$ExpeDat_Username The default ExpeDat username to use if none is given in the User Link.  If no username is provided at all, the user will be prompted to enter a username and password when they click the ExpeDat link.
$ExpeDat_Password The default ExpeDat password to use if none is given in the User Link.  If no password is provided at all, the user will be prompted to enter a username and password when they click the ExpeDat link.  A password given here will not be immediately displayed to the user, but it will appear in the target of the ExepDat link.
$ExpeDat_Path An additional path which will be prepended to all file names passed to ExpeDat.  This is useful if target files will be in a sub-folder of the ExpeDat Home Directory.  Always use forward slash '/' to delimit remote paths.
$ExpeDat_Encrypt Set to "1" to enable encryption or "0" to disable it by default.  Leave this blank to let ExpeDat Desktop's settings decide.
$ExpeDat_Compress Set to "1" to enable inline compression or "0" to disable it by default.  Leave this blank to let ExpeDat Desktop's settings decide.
$ExpeDat_Handler Set to a server Object Handler to request that transactions be routed to that handler.  If left blank, no handler will be used regardless of ExpeDat Desktop's current settings.
$ExpeDat_Upload Set this to any non-empty string to make uploading files the default action.  Uploading will cause the ExpeDat client to prompt the user to select files and then upload those files to the ExpeDat server at the pathname given in the URL.
$Page_Title This text will be inserted as the HTML <TITLE></TITLE> tag of the page and the headline beneath the menu bar.
Default: "ExpeDat™ URL Redirect"
$Page_Message This text will be inserted below the headline and above the file browser.
Default: "This page was generated by a customizable PHP script."
$Your_Logo This image URL will be placed at the top left of the page.
Default: The Data Expedition, Inc. logo.
$Your_Support The URL to be followed when "Home" is clicked in the menu.
Default: https://www.DataExpedition.com/expedat/
$Your_Support The URL to be followed when "Support" is clicked in the menu.
Default: https://www.DataExpedition.com/expedat/Docs/
$Your_Email An email address (or any other text) to be displayed in the lower left of the page.
Optional
$Your_Phone A phone number (or any other text) to be displayed in the lower right of the page.
Optional
$Download_Mac A link to your licensed copy of "ExpeDat Desktop.app" client for macOS.  You must "Compress" it first using the Finder so that the file you are linking is named something like "ExpeDat Desktop.zip".
Default: https://www.DataExpedition.com/expedat/download.html
$Download_Win A link to your licensed copy of "ExpeDat Desktop.exe" client for Windows.
Default: https://www.DataExpedition.com/expedat/download.html

You may perform additional customization by editing the remaining explink.php source code, however such alterations are not supported.

Browser Requirements

explink.php requires JavaScript, and a web browser compliant with HTML4 and CSS3 standards.