A file attached to a blog article, such as a document offered for download, created when the article is approved from the meta fields in its content file. The bytes are not held on the row, only the hash of the stored file, so serving one means reading that hash from the blob store. The tag is a free text label the theme can use to tell one attachment from another, for example to pick out a hero download among several files. An article can have many files.

Group: Database Entities

Implements: Serializable


Properties

PropertyReturnsDescription
articleBlogArticleThe article this file belongs to. Never null.
fileHashStringHash of the file in the blob store. The bytes are not on this row, so use the hash to read the file from the content repository. Never null.
idlongDatabase identifier for this file, assigned when it is first saved.
nameStringFile name of the attachment as it appeared in the article's content, and the name it is served under. Never null.
tagStringFree text label for the attachment, which a theme can use to pick out a particular file among an article's attachments. Null if none was set.

Methods

getId()

Returns: long

Database identifier for this file, assigned when it is first saved.

getName()

Returns: String

File name of the attachment as it appeared in the article's content, and the name it is served under. Never null.

getArticle()

Returns: BlogArticle

The article this file belongs to. Never null.

getFileHash()

Returns: String

Hash of the file in the blob store. The bytes are not on this row, so use the hash to read the file from the content repository. Never null.

getTag()

Returns: String

Free text label for the attachment, which a theme can use to pick out a particular file among an article's attachments. Null if none was set.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.