File Upload

Schema Alias: Umbraco.UploadField

UI Alias: Umb.PropertyEditorUi.UploadField

Returns: string

Adds an upload field, which allows documents or images to be uploaded to Umbraco.

You can define which file types should be accepted through the upload field.

For uploading and adding files and images to your Umbraco project, we recommend using the Media Picker.

Find the full documentation for the property in the Media Picker article.

Data Type Definition Example

File Upload Definition

Content Example

Content Example Empty
Content Example

In code, the property is a string, which references the location of the file.

Example: "/media/o01axaqu/guidelines-on-remote-working.pdf"

MVC View Example

Without Models Builder

With Models Builder

Add values programmatically

See the example below to see how a value can be added or changed programmatically. To update a value of this property editor you need the Content Service and the Media Service.

The example below demonstrates how to add values programmatically using a Razor view. However, this is used for illustrative purposes only and is not the recommended method for production environments.

If Models Builder is enabled you can get the alias of the desired property without using a magic string:

Last updated

Was this helpful?