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.
Data Type Definition Example

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.
If Models Builder is enabled you can get the alias of the desired property without using a magic string:
Last updated
Was this helpful?