Hi,
I have a grid which is bound to a list of viewmodels. When creating a record I want to upload an image as well. Following is my VM.
For the HeaderImage property I need an upload control. So I have defined an editor template for it.
When I go in to Create record the upload control displays fine. The problem is
1. How can I grab the uploaded files from the Action Method?
2. How to restrict the files to .png and jpg for Kendo().Upload()
Thanks!!
I have a grid which is bound to a list of viewmodels. When creating a record I want to upload an image as well. Following is my VM.
public class ClientModel : IClientModel
{
[ScaffoldColumn(false)]
public int ClientID { get; set; }
[Required]
[DisplayName("Client Name")]
public string Name { get; set; }
[UIHint("_ClientHeaderImage")]
public string HeaderImage { get; set; }
public bool IsActive { get; set; }
private string _status;
public string Status
{
get
{
_status = IsActive ? "Enabled" : "Disabled";
return _status;
}
set { _status = value; }
}
}
For the HeaderImage property I need an upload control. So I have defined an editor template for it.
@(Html.Kendo().Upload()
.Name("HeaderImage")
)
When I go in to Create record the upload control displays fine. The problem is
1. How can I grab the uploaded files from the Action Method?
2. How to restrict the files to .png and jpg for Kendo().Upload()
Thanks!!