Site files

Site files are static resources that do not change often over time and which are referenced in the Webpagebytes CMS generated content. Examples of such files are: javascript and css libraries (jquery, Twitter Bootstrap), background images, video files, logos.
The files are displayed in the admin web interface in a hierarchical view of folders.
Webpagebytes CMS files section, used to store binary files, 3rd party files and frameworks used in the generated content

The web administration interface allows to upload files or folders, the folders will maintain the same file system structure as on the disk.

A site file has the following attributes

External Key The External Key identifier for the current site file.
File Name The name of the file that was uploaded.
Size The size in bytes of the site file.
CRC32 A checksum on the file content represented on 32 bits.
Content type The content type detected by the CMS when the file was uploaded (the detection is based on file extension)
Adjusted content type A customizable content type that overrides the content type detected on upload.
Blob key A file storage specific identifier for the site file.
Directory flag A folder is stored as a site file with this flag set to on. If this flag is on, then the values for Size, CRC32, Content type, Adjusted content type are not set.
Owner External Key The folder owner of the current site file (file or folder). This values makes possible to create the tree like structure of the site files. The files and folders in the root folder will have empty string for this value.

Serving static files

Files and folders that are uploaded are not automatically available to the web application clients through HTTP requests. These will need to be associated with one or more site url(s) in order to be available. See site urls and static files on how to publish an entire folder tree to be accessible through HTTP requests.

Accessing site files content

Sometimes a web application needs to generate content server side through server side plugins or using batch mode . In both cases the web application will use WPBContentProvider interface in order to fetch content, including site files content.
In other words, a file content uploaded under site files will be accessible from controllers by using WPBContentProvider interface.