Server File Browser

A standard web browser can be used to view files and folders, monitor upload status, check available free space, start uploads and downloads, and perform file maintenance.  No plugins or Java are required.  End-users must download an ExpeDat client, which can be done from the browser page.  Implementing ExpeDat web browsing requires the following:

It is not necessary for the web server and ExpeDat server to be running on the same machine, but they do need to share at least one folder.

Windows: Some functionality may be limited on Windows web servers.  Windows PHP cannot correctly display file sizes larger than 2 gigabytes.  Make sure all pathnames use forward slashes '/', as backslashes may cause syntax errors in PHP and JavaScript.

Web Browser Interface

Web Browser Interface

The screenshot above shows an example folder being viewed using the expedat.php web interface with its 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 the contents of the targeted ExpeDat folder.  Files which are partially uploaded will display additional information about their progress or error status.  The available free disk space is shown in the lower right when uploads are enabled.  Clicking the "Refresh" button reloads the page.

Clicking on a sub-folder will view its contents in this window.  Clicking a file name will download that file in ExpeDat.  Additional actions are available in the "Actions" column.  You can select which actions are visible and all actions are subject to the permissions of the ExpeDat server.

Installation

The expedat.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 the folder you will be sharing via ExpeDat.  You can rename expedat.php however you want.

Open this copy of expedat.php in a text editor.  All of the settings needed to customize the page are at the top of the file.  At a minimum, you must set the address and port of the ExpeDat server and the full path of the folder being served.  Type the desired value inside the quote marks.  For example:

$ExpeDat_Server = "exp01.example.com:8080"; $Local_Folder = "/var/expedat/myfiles";

The files in $Local_Folder must be visible to both the web server and the ExpeDat server.  You may need to adjust their permissions.  These files and folders do not need to be writeable by the web server: all modifications will be made within ExpeDat.

Always use forward slash '/' to delimit folder paths, even under Windows.  For example, "C:/expedat/folder".  Backslashes may be interpreted by PHP or JavaScript as escape characters, causing syntax errors.

Only the contents contents of $Local_Folder and its sub-folders can be browsed with expedat.php.  If you wish to restrict access to expedat.php, do so using your web server's configuration.

Authentication

By default, the end-user will be prompted to enter an ExpeDat username and password whenever they perform an action.  You can preset the username by setting the $ExpeDat_Username in expedat.php.  Or you can avoid this prompt entirely by setting $ExpeDat_Password.

The default configuration is to view files for a single username.  This might be used for a shared upload/download folder.  To support multiple users, you could have separate copies of expedat.php for each username folder and guard each with an HTTP authenticated login.

You can also support multiple authenticated users with a single expedat.php by combining HTTP authentication under SSL with a servedat private AuthFile.  For example, the settings in expedat.php might look like this:

$Local_Folder = "/var/expedat/".$_SERVER['REMOTE_USER']; $ExpeDat_Username = $_SERVER['REMOTE_USER']; $Page_Title = "Downloads for \"".$_SERVER['REMOTE_USER']."\"";

The settings above would rely on HTTP authentication to control access and determine the authenticated username.  That username is then used to determine which folder to display and is passed to ExpeDat Desktop for ExpeDat authentication.

The format of servedat's AuthFile can be made compatible with the Apache htpasswd file format by using legacy password hashes.  This allows you to share the same file and user credentials for both the web server and ExpeDat.  This compatibility varies by platform and web server software.  Do not use the htpasswd command to generate passwords as this will remove important ExpeDat data: use mkpasswd -L instead.

You may also use expedat.php with SysAuth users by using the SysHome configuration to place user folders into a shared location visible to the web server.  You may need to maintain a separate HTTP authentication database to control access to expedat.php, depending on your web environment.

Customization

The settings at the top of the expedat.php file allow you to change the appearance and functionality of the page.  Values must be given for $ExpeDat_Server and $Local_Folder.  Values for $Download_Mac and $Download_Win should be given so that end-users can easily download a licensed client.  All other values can be left as-is, and defaults will be provided.

$ExpeDat_Server The DNS name or IP address which is hosting the ExpeDat server and its port number.  For example: "exp01.example.com:8080".
Mandatory.
$Local_Folder The pathname of the ExpeDat folder to be viewed.  Always use forward slash '/' to delimit folder paths, even under Windows.
Mandatory.
 
$Download_Mac A link to your licensed copy of "ExpeDat Desktop.app" client for OS X.  You must "Compress" it with the Finder first so that the file you are linking is named something like "ExpeDat_Desktop-mac.zip".
Default: https://www.DataExpedition.com/expedat/download.html
$Download_Win A link to your licensed copy of "ExpeDat Desktop.exe" client for Windows.  Use the win32 version for maximum compatibility.  You should Zip it first so that the file you are linking is named something like "ExpeDat_Desktop-win.zip".
Default: https://www.DataExpedition.com/expedat/download.html
 
$ExpeDat_Username The ExpeDat username to authenticate all ExpeDat actions.  If this is blank (""), the user will be prompted to enter a username when they perform an ExpeDat action.  If you delete this line, no authentication will be performed (the server must be configured for Anonymous Users).
Prompt if empty.
$ExpeDat_Password If a username is given, a password may be given as well.  This allows ExpeDat actions to be performed without prompting the user.  The password is not shown to the user, but they can find it.
Prompt if empty and username is given.
$ExpeDat_Path An additional remote path which will be prepended to all file names passed to ExpeDat.  This is necessary if $Local_Folder is a sub-folder of the ExpeDat Home Directory.  Always use forward slash '/' to delimit remote paths.
Optional.
 
$Hide_Upload
$Hide_Download
$Hide_NewFolder
$Hide_Delete
$Hide_Rename
Hide the corresponding "Actions" button by setting any non-empty value.  At least one action must be un-hidden.  If $Hide_Download is set, clicking a file name will no longer download that file.  Note that these settings only disable the functionality within the expedat.php web interface.  To restrict what users can do within the ExpeDat clients, see the server Access Privileges.
Optional.
 
$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™ Integration Example"
$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.
$Show_Instructions Set any non-empty value to display standard instructions for new users just below the Page_Message.
Optional
 
$Your_Home 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

You may perform additional customization by editing the remaining expedat.php source code, however such alterations are not subject to technical support.

Browser Requirements

This page requires JavaScript, and a web browser compliant with HTML4 and CSS3 standards.  If you are using Internet Explorer, you must use IE 8 or later.