File Storage

CommuniGate Pro Accounts contain a File Storage - a set of HTML, JPEG, and other files. This file set is also known as a personal Web site.

The CommuniGate Pro HTTP module can be used to retrieve files from these sites.

The CommuniGate Pro FTP module can be used to retrieve and update File Storage files, and the CommuniGate Pro TFTP module can be used to download File Storage files.

The CLI API can be used to manage the Account File Storage.

Only the Account owner or an Administrator can modify Account File Storage.

A File Storage can contain nested folders (file directories).

If the Account and its Domain have the WebSite Service enabled, anybody can retrieve Account File Storage files using any HTTP browser, FTP, or TFTP client.

If a File Storage file is located inside the private "folder" (directory), the browser (HTTP), FTP, or TFTP user needs to authenticate as the Account owner or as an Administrator to access that file.

The total number of files and folders and the total size of all File Storage files is limited with the Account Settings.

File Storage can also be used:

HTTP Access to File Storage

CommuniGate Pro allows each user to be presented on the World Wide Web with a personal Web site. The URL for the accountname@domainname Account File Storage is:
<http://domainname:port/~accountname>   where the port is the WebUser port.
For example, the jsmith@client1.com account has a personal Web site at:
<http://client1.com:8100/~jsmith>

Personal Web sites use the same HTTP port as the WebUser Interface (the port 8100 by default).

In addition to the ~ prefix, an alternative prefix can be specified in the Domain Settings. The alternative prefix can be an empty string.

All Routing Rules discussed in the Access section apply to the personal Web site URLs, so Account and Domain aliases can be used in the personal Web site URLs.

Personal Web sites can be accessed without a prefix, using just the server part of the URL string. When the CommuniGate Pro server receives an HTTP connection on the its WebUser port, it uses the special Domain Routing procedure.

If the domain name user.domain.com has a DNS A-record pointing to the IP address of the CommuniGate Pro server, and the CommuniGate Pro Router has the following record:
<LoginPage@user.domain.com> = userA@domainB.com
and the Account userA exists in the CommuniGate Pro Domain domainB, then the URL http://user.domain.com/ can be used to access the personal Web site (File Storage) of the userA@domainB.com Account.

File Storage must not contain any index.wssp file. This name is reserved for the File Storage Management forms.

The home (default) page of a personal Web Site should have the default.html name. This means that when the file name is not specified explicitly, the default.html name is assumed. If a File Storage has folders (subdirectories), then the request with the http://server:port/prefix user/folder/ URL retrieves the default.html file from that subdirectory.

The name of the default page is specified as an Account Setting and it can be modified on the per-Account basis.

Private Folder

An Account File Storage can contain a folder with the name private.
Files in that folder are available only to the Account owner and Administrators with the CanAccessWebSites Domain Access right.

The private folder can be used as a repository for any type of documents - the user can access them from anywhere, using any browser, FTP, or TFTP client.


HTML-based Management

Users can manage their Account File Storage using any browser. There are two methods to access the File Storage adminstration pages:
  • By opening a WebUser Session, and using the Files link in the WebUser Interface navigation panel.
  • By opening the Index.wssp file in their own personal Web site:
    http://domain.dom:8100/~username/Index.wssp
    A browser will present a Login (authentication) dialog box, and the users should enter their Account names and passwords in order to open the Web site administration page.

Server administrators with the All Domains and Accounts Access Right and Domain administrators with the CanAccessWebSites access right can access other Accounts' File Storage.
They can use the same URL, opening the Index.wssp file, but they should provide their own Account names and passwords.

Server and Domain administrators can access File Storage of any Account using the WebAdmin Interface: the Account management pages have the Files link in their navigation panels.

All management methods use similar HTML pages for File Storage administration:

Click the Browse button and select a file you want to upload to the File Storage. Click the Upload File button to upload the file. Its name should appear in the list.

Select the checkboxes to mark the files and/or folders you want to remove from the File Storage and click the Delete Marked button. The selected files will be removed.

Type in a name and click the Create Folder button to create a folder (sub-directory) in the File Storage.

Select exactly one checkbox to mark the file or folder you want to rename, and enter a new name for it in the field next to the Rename Marked button. Click the Rename Marked button to rename the selected file or folder.

Click the file name link to open the file. Click the folder name link to open the subdirectory. When a subdirectory is opened, its name is displayed on the top of the file list. Click the UP link to open the parent subdirectory.

The This Folder line displays the total number of files and folders, and the total size of all files in the opened folder. The Totals line displays the total number of files and folders, and the total size of all files in the File Storage. The limits line displays the specified maxmimum number of files and folders and the specified maxmimum total file size for this File Storage.


HTTP-based Management

File Storage data can be modified using the HTTP 1.1 PUT, DELETE, and MOVE methods. Some HTML design tools can use these methods to upload files to the server.

These HTTP requests should contain the Authentication information: the Account name of the File Storage owner or the Account name of a Server/Domain Administrator, and the password for that Account.


FTP-based Management

File Storage data can be modified using the CommuniGate Pro FTP module. When an Account user connects to the FTP module, the FTP "root directory" as well as the "current directory" are set to the topmost directory of the Account File Storage.


Special Files and Folders

Certain File Storage names have special meanings.

default.html
This file is retrieved via HTTP when no file name is specified in the URL: http://server:port/~username/ or http://server:port/~username is equivalent to http://server:port/~username/default.html.
The same is true for all File Storage subfolders: http://server:port/~username/subfolder/ is the same as http://server:port/~username/subfolder/default.html
This default file name is specfied as an Account Setting, and it can be changed on the per-Account basis.
freebusy.vfb
This text file contains the user Free/Busy information. When the Account Main Calendar is modified with the CommuniGate Pro MAPI module, XIMSS interface, or with the WebUser Interface module, or AirSync the file is deleted.
When this file is being accessed and it does not exist, the Server opens the Account, opens its Main Calendar mailbox, builds the Free/Busy information, and stores the information in the freebusy.vfb file.

If the Free/Busy information cannot be built (for example, if no Main Calendar mailbox exists in the Account), the HTTP module generates an empty Free/Busy dataset and sends it to the client.

any_name.meta
These files contain meta-information about the any_name files. For example, the Betty.jpeg.meta file contains meta-information about the Betty.jpeg photo file, such as the location where the photo was taken, comments, etc.
When a File Storage file is being renamed or removed, its meta-file is automatically renamed or removed with it.
The meta-file should be a text file in the XML format. The topmost XML element should be a meta element.
private/logs/calls-yyyy-mmm
These text files are created and filled with the Signal Dialog objects. yyyy is a 4-digit year number, and mmm is a 3-letter month name.
Each file record has tab-delimited fields and contains information about one call made from or to the Account.

The following record formats are supported:

2_dd-mmm hh:mm:ss_direction_peer_callId_callTime_alertTime_errorCode[_programName]
where:
_
is the tabulation symbol (symbol code is 0x09)
2
record format version
dd
2-digit month day number
mmm
3-letter month name
hh, mm, ss
2-digit numbers for the call termination hour (00..23), minute (00..59), second (00..59)
direction
1-letter call direction: I - incoming, O - outgoing
peer
E-mail address of the call peer, in the
  <username@domainName>
or
  "real name" <username@domainName>
format.
callId
call Call-ID string.
callTime
call duration (number of seconds). The time between the moment the call connected and the moment the call disconnected. If this call has not succeeded, this field is empty.
alertTime
call alerting time (number of seconds). The time between the moment the call started and the moment the call connected or (if the call has not succeeded) the moment the call failed.
errorCode
a string with the error code for the call attempt failure or the call disconnect reason. If the call has completed without an error, this field is empty.
programName
this optional field contains the name of the Real-Time Application that handled this call.

Virtual Files and Folders

Virtual names do not specify actual files or folders in the File Storage, but they can be used to retrieve certain information.

index.wssp
This name is used for HTML-based File Storage management. Access to this resource requires authentication.
freebusy.wssp
This name is used to retrieve formated Free/Busy information. The actual data is retrieved from the freebusy.vfb file (see above).
$DomainSkins, $ServerSkins, $ClusterSkins
These virtual directories provide access to the Domain-wide or to the Server-wide/Cluster-wide Skins. Each Skin is presented as a subdirectory, with the name $unnamed$ used for the "unnamed" Skins.
The Account must have the proper Access Rights to see and manage these directories.
$DomainPBXApp, $ServerPBXApp, $ClusterPBXApp
These virtual directories provide access to the Domain-wide or to the Server-wide/Cluster-wide Real-Time Application Environments. Language variants are presented as subdirectories.
The Account must have the proper Access Rights to see and manage these directories.

Shared Private Files

Read access to files inside the private directory can be granted to other CommuniGate Pro users and external "guests".

Create or modify a .meta file for the private directory or any of its subdirectories (private.meta, private/dir1.meta), or for any file within the private directory or any of its subdirectories (private/dir1/file1.txt.meta).
Insert a <accessPwd/> element into the .meta file with a <key/> element containing a random string - the access-password. It is recommended to add an <EMail/> element(s) with the E-mail address(es) of the users to whom this access-password has been sent.

Example:
<meta>
  <accessPwd>
    <key>dyf984897498ih12ui3u-3y887</key>
    <EMail realName="User Name">user1@domain1.dom</EMail>
    <EMail>user2@domain2.dom</EMail>
  </accessPwd>
</meta>

If such a .meta file is created for the private directory (the private.meta file), it enables an alternative access path to all files within that directory and its subdirectories:

pwd/access-password/

If such a .meta file is created for the private/dir1/dir2 directory (the private/dir1/dir2.meta file), it enables an alternative access path to all files within that directory and its subdirectories:

protected/dir1/pwd/access-password/dir2/

If the private/dir1/dir2.meta file contains the XML data listed in the example above, he user can compose a Personal Site URL using the alternative path:

http://server:port/~username/protected/dir1/pwd/dyf984897498ih12ui3u-3y887/dir2/file.name

The user then can send this URL to user1@domain1.dom and user2@domain2.dom and other addresses. The recipients can access this file.name file by following this link.

The user can revoke this access right by removing this <accessPwd/> element from the .meta file.

Alternative file paths can be used in FTP and TFTP protocols, and in all other CommuniGate Pro components that access the Account File Storage.