DNN Global Storage - Documentation

DNNGlobalStorage - How to configure each provider

You can find a demo / documentation video about setting up each provider in the Demo Videos page.

How to synchronize folders already created in the target location

In DNN 7.1 and later, the DNN Core was changed (by DNN Corp) to do not automatically find and synchronize each root folder found on the configured provider. You'll have to manually create each one, and with the exact same 'case' (e.g. "Documents" and "documents" are not the same. You should call it same as it is in your remote storage. Ref.: https://dnntracker.atlassian.net/browse/DNN-3164

Therefore, make any new folder under \\server\share automatically visible in DNN, make the \share a root, map in DNN a first level folder and have all the sub-folders under it. See the example (screenshots) below.


DNNGlobalStorage - Using the DNN File System API

Any 3rd party module can take advantage of DNNGlobalStorage simply by using the DNN File System API (DNN Virtual File System) for all the file and folder related operation. The DNN core is using it everywhere, and many 3rd party vendors too.

By DNN File System API, module developers are abstracted from any knowledge about any cloud storage (S3, Box, etc.), FTP, UNC, or whatever. Example code to get a file's Url (no matter where it really is, if authentication is required or not, etc.:

   var file = FileManager.Instance.GetFile(fileId);
   return FileManager.Instance.GetUrl(file);    

Example code to get a file's content (as a stream). This code is valid for any local (standard) file, or files using the built-in "Secure" or "Database" providers, or files using GlobalStorage's "Box, "Google Drive" or whatever provider:

   var file = FileManager.Instance.GetFile(fileId, true);
   var content = FileManager.Instance.GetFileContent(file);

Example code to get the files in a given folder (again, it doesn't matter if the folder and files are actually local or in Amazon S3, Azure, an FTP server or whatever):

   var folder = FolderManager.Instance.GetFolder(portalID, folderPath);
   var files = FolderManager.Instance.GetFiles(folder, false, false);

You can find lots of examples about using properly the DNN File System API reviewing the DNN Core code (available in GitHub). Or perhaps, the built-in Intellisense in Visual Studio is enough.

Using DNN Global Storage for DNN Images, Users and other Folders

"A change was introduced to Dnn Platform in version 7.3, which was the ability to create a new install/site with Dnn and create the contents of the /Portals/ path created on separate file storage. This is achieved through the use of Folder Providers, which were originally introduced in Dnn 6. The change is pretty simple – when the install is run, it looks for a directive to create the portal folders either within the application (the default scenario) or using another Folder Provider. Note that I have talked about Cloud providers here, but it’s not restricted to that – you can use any Folder Provider, and you can build your own Folder Providers. So that includes UNC based folder providers and anything else you can come up with."

Please notice this is pure DNN administration work (out of DNNGlobalStorage's free support scope). For further details about how to accomplish this, you can refer to this DNN blog article: http://www.dnnsoftware.com/community-blog/cid/155329/using-cloud-storage-for-dnn-images-users-and-other-folders

What people are saying...