Binary Field documentation for the dotCMS Content Management System

Adding a Binary Field to a Content Type allows the user to embed and store any file directly in the content itself without placing that file in the Site Browser hierarchy.

Adding a binary field

The advantage of using a binary field instead of an image or file field is that the file is stored directly in the content and can be edited from the contentlet itself. Only those roles that have permissions over the content will have access to view or modify the file. Serving binary images can also be more performant in dynamic pulls.

The disadvantage of using a binary field is that, since it does not live in any folder location on the folder directory hierarchy chain, a directory path cannot be passed to a photo gallery, video gallery, file repository, etc. If an image or file may be used with multiple pieces of content or in multiple widgets, an image or file field would probably be a better choice, since they can be displayed, in bulk, from a single reference to the site/folder to which they were uploaded.