Files are Content - Documentation topics on: assets,binary,content,fileasset,files,.

Files are Content

When you create a new file, you are actually creating a new piece of content.

Treating files as content provides a number of benefits:

  • You can create new file Content Types (base type:file).
  • You can customize fields on each file Content Type.
  • You may use all normal content tools on files, including adding taxonomy, the REST API, relationships and pulling files with Lucene queries.
  • You can apply different Workflows to each file Content Type.
    • For example, your photos and document libraries can have different Workflows.
  • Files are URL addressable binary files with all the benefits of being content.
  • Files have CDN friendly pathing to image manipulation with no query strings.

Adding Fields to a File Content Type

Since files are content, you can add fields to a file content type in the same way you add fields to any other content type.

Note that when adding or editing fields to the File Asset Content Type, by default the Metadata field is on a separate tab (below a Tab Divider field). So if you wish to add a new field that will display on the first tab in the content editing screen, make sure to add the newly created field above the Metadata field.

Bulk File Operations

Although files can be created, updated, customized, and manipulated in the same ways as content, files are unique that there are several ways to upload multiple files at the same time (in “bulk”) without the user entering specific values for each field in the file, such as:

  • Uploading multiple files at the same time from the Site Browser.
  • Uploading and managing files using WebDAV.

Because of this, it is important that the values of all custom fields on file Content Types can be set automatically, so appropriate values can be assigned when files are uploaded in bulk. This means that for any custom field on a file content type one of the following should be true:

  • It should not be a Required field, OR
  • It should Have a Default value set.

If you have a Required field on a file Content Type which does not have a default value for the field, you will not be able to upload files of that Content Type in bulk. This is true even for the default File Asset Content Type, so it's important that if you add any custom fields to the File Asset Content Type, you configure them appropriately to allow bulk uploads.