Try our conversational search powered by Generative AI!

Upload file by user


I would like to upload file from user form. When I search for the solution, I found that EpiServer.Forms support file upload but we are not using Forms for the pages and created programmatically.

For example, we are creating a page element using the following code

Name = "Name",
GroupName = SystemTabNames.Content,
Order = 10)]
public virtual string userName { get; set; }

Is there any way to upload file from user forms?

Also, Geta.Epi.MediaReferenceSelector can be used with following UI hints


What is the variable type to use for MediaReferenceSelector?

Edited, Jan 09, 2019 7:28

If you are not using EPiServer Forms, you have to handle upload file yourself. By creating page controller (see Alloy MVC), you can all request information including files which are uploading. In there, you save your file and update property as you want.

Jan 15, 2019 8:06
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.