Hi,
I have fileObjects and it has properties (name, extension, size, filepath). I understand name, extension and size are the reserved keywords that can be used in template code. However, i need the filepath (additional parameter) to be passed and used in template code.
So that when user click on the hyperlink, it will call the download function with two parameter (path and name). File path is mandatory because each file is stored in respective unique id (folder name) folder.
<% List<FileModel> files = ViewBag.files; %>var fileObjects = <%: Html.Raw(Json.Encode(files)) %>$("#upload-file").kendoUpload({ async: { saveUrl: "<%: Url.Action("UploadFile", ViewBag.Controller, new { topicId = Model.Id }) %>", removeUrl: "<%: Url.Action("RemoveFile", ViewBag.Controller, new { topicId = Model.Id }) %>", autoUpload: true }, template: "<span class='k-progress' style='width: 100%;'></span>" + "<span class='k-icon k-i-doc'></span>" + "<span class='k-filename' title='#=name#'><a href='\\#' onclick='downloadFile(\"#=name#\")'>#=name#</a></span>" + "<strong class='k-upload-status'>" + "<button type='button' class='k-button k-button-bare k-upload-action'>" + "<span class='k-icon k-i-close k-delete' title='Remove'></span>" + "</button>" + "</strong>", files: fileObjects, success: onSuccess, error: onError, upload: onUpload});
Thanks.
Regards,
Yap Hui Hong