DNN utilizes folders to store any assets that are uploaded to the Portal. Knowing how they work is instrumental in troubleshooting any issues regarding site assets and the folders that hold them.
This article explains what a folder provider is, what types of folders are utilized in DNN, and how to make changes to these folders via the UI (User Interface) and with SQL.
What Is a Folder Provider?
Simply put, a Provider is a design pattern often used in .NET applications. The Provider Model can probably be best explained, in-depth, via the MSDN (Microsoft Developer Network).
To simplify this explanation and tie it more to DNN, Providers can be broken down into two basic types:
- Abstract: This is something exposed as part of the DotNetNuke Core API.
- Example: Data Provider
- Concrete: A specific implementation of the abstract API.
- Example: SQL Data Provider
The FolderProvider consists of two APIs that work with files and folders (FileManager and FolderManager). This new Provider allows the application to work with different storage locations. By default, there are three storage locations:
- Insecure filesystem (Standard Folder Provider)
- Secure filesystem (Secure Folder Provider)
- Secure database (Database Folder Provider)
Evoq Basic versions also include a couple of Cloud Folder Providers, specifically Amazon S3 and Windows Azure, allowing users to store files in the Cloud, with all the benefits that it implies.
What Are the Different Types of Folders Used in DNN?
The standard file system stores the file within the filesystem of the DotNetNuke application.
When a user creates a folder as a secure folder, DotNetNuke will append a ".resources" extension to any files within that folder.
The ".resources" extension is mapped to the 404-handler automatically by asp.net, which means that a request to that file will be ignored (i.e., if a user knew or could guess the URL, a request for "www.mysite.com/portals/0/wages.xls" would serve up that file. However, a request for "www.mysite.com/portals/0/wages.xls.resources" would be denied).
This option is similar to the secure filesystem, except that the files are stored in the database.
UI (User Interface) view of the Persona Bar Assets when creating a new folder.
- Name: Define the name of the folder.
- Type: Set the folder type.
Keep in mind that you are not able to change the folder type after you have created the folder through the UI, please make sure you are selecting the correct folder type before creating it.
Making Changes Using SQL
If you would like to make changes via the backend with SQL, you will need to look at the following two tables:
- Look at the
FolderMappingstable and filter it by the specific Portal. Then choose a mapping name of either
SELECT * FROM FolderMappings WHERE PortalID = # AND MappingName = ‘’
Make a note of the
- Locate the
FolderIDby using a SELECT statement based on the folder path (e.g., Images/test).
SELECT * FROM Folders WHERE FolderPath = ‘’
- Using the
FolderID, run an UPDATE statement on the specific folder in the Folders table.
UPDATE Folders SET FolderMappingID = # WHERE FolderID = #
- Delete Folder
- Move Folder
- Edit Folder Properties
- Edit Folder Permissions
- S3 Folder Providers
- Default Workflow for all Folders Within Assets
- Configuring Folder/File Versioning