Article How should I store user contributed media?

How should I store user contributed media?

Note: You should make any changes referenced in this section before you upgrade your Telligent Community site.

Telligent Community makes use of a Centralized File Storage (CFS) provider. CFS provides a great deal of flexibility to the developer or system administrator because it is relatively straightforward to configure Telligent Community to use any number of external file storage systems (Amazon's S3, UNC path, etc.). Telligent Community supports the concept of an overriding configuration file, so rather than changing the default install, you can create an overrides file - communityserver_override.config.

Here is an example that overrides the CFS to use a UNC path:

<Override
 
    xpath="/CommunityServer/CentralizedFileStorage/fileStore[@name='CommunityServer.Components.PostAttachments']"
     mode="change"
     name="basePath"
     value="\\CSFiles">
</Override>

Note: The value for the xpath element should be on one line. Also, to properly override CFS, you would need to provide an override value for all of the CFS entries (of which the above is one example). 

In this configuration, at least one of the nodes is accessing a resource (files) on another system (the one that hosts the UNC share). The security implications of cross-machine resource requests can be complicated. You can configure security parameters for your application a number of ways and each operating system uses a different account to run the ASP.NET process. There is a great matrix that shows you the various security contexts in which your resource request will leave the server.

Because many of these options are environment-specific, we encourage you to read about the various configurations that allow for impersonation and delegation in Telligent Community or any ASP.NET application. If you are switching from local file share to remote file share, you need to move all of the files and folders to the remote file share. You also need to review the file permissions once they are moved to the remote file share to ensure they are still accessible.

Understanding how the underlying ASP.NET security model works is critical to understanding how you must configure remote network file requests from within your application. 

In the event centralized storage is undesirable, local storage on the web nodes can be used. Available storage should be monitored closely.  DFS can maintain file synchronization and should be monitored closely to ensure its health. To minimize the complexity of maintaining your communities web nodes, the best practice is to ensure the local paths are identical across all nodes.