New to Kendo UI for jQuery? Start a free 30-day trial

Files

methods

Gets or sets the attached files in the PromptBox. When called without arguments, returns the current files array. When called with an array, sets the attached files.

Returns:Array

The array of attached files when called without arguments.

<div id="promptbox"></div>
<button id="get-files">Get Files</button>
<script>
var promptbox = $("#promptbox").kendoPromptBox({
    fileSelectButton: true,
    placeholder: "Attach files..."
}).data("kendoPromptBox");

$("#get-files").click(function() {
    var files = promptbox.files();
    console.log("Attached files:", files);
});
</script>
<div id="promptbox"></div>
<script>
var promptbox = $("#promptbox").kendoPromptBox({
    fileSelectButton: true,
    placeholder: "Attach files..."
}).data("kendoPromptBox");

promptbox.files([
    { name: "document.pdf", size: 1024 },
    { name: "image.png", size: 2048 }
]);
</script>
Not finding the help you need?
Contact Support