RealityServer Features

Content Upload

Content can be upload to the RealityServer content root directory by configuring URL's to accept multipart/form-data posts. All files provided within the post are then written to the configured directory within content root. EG:

content_root content_root
<url /user_textures/>
    upload_target custom_textures
</url>
resources content_root/custom_textures

The above will accept posts to the /user_textures/ URL and write any posted files into the content_root/custom_textures directory. Any files posted will then be available for loading as resources (IE: textures, light profiles or BSDF measurements) as the custom_textures directory is specified as a resource path.

Example

An example file upload HTML page and configuration can be found in the src/upload directory. Please see the README.txt file in that location for more details.

Upload format

Upload is performed using standard multipart/form-data format whose specification is beyond the scope of this document (see RFC 7578 for more details). Any given part within a post is identified as a file upload by it having exactly one Content-Disposition header which contains a filename parameter. Any parts not meeting this requirement are ignored.

Restrictions

For security reasons files can only be posted to specified directories within content root. Any path information given in the filename specification of a part's Content-Disposition header is ignored. Consequently if you wish to be able to post files to subdirectories you need to configure each subdirectory separately to the top level directory.

Edge/Internet Explorer

The Microsoft Edge and Internet Explorer browsers provide filenames in an ambiguous format. They provide the full local filesystem path (rather than just the leaf filename) and do not escape the resulting \ path separators. While this strictly meets the specifications for HTTP headers it is ambiguous since if the \ characters are interpreted as escape characters the first character of the actual filename is ignored. Consequently, if an upload appears to be coming from Edge or Internet Explorer (the User-Agent header contains either Edge/ or Trident/) header escaping is disabled.

Future Work

It is anticipated that the file upload system will be expanded in the future to allow upload methods other than multipart/form-data that are easier to use in AJAX or Application Server environments. Additionally post-processing functionality such as decompressing uploaded files will be included.