HomeDev GuideAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket


Media (such as files) are treated as any other content type, but have an associated binary data that is stored using BLOB providers, which are optimized for storing streams of data.

## Examples

The following example defines a simple content type that is used in the examples that follow it:



The following example creates a new file and defines a simple text file with the message _Hello world_:



The following example creates a location where the actual file type is resolved during runtime from extension:



The following example updates an existing file with new metadata:



The following example updates an existing file with new binary data:



See [BLOB storage and providers](🔗) to change storage model for media.