2013-02-19 48 views
2

你能告訴你如何只允許1個文檔上傳在kendo ui上傳。如果文件已被選中,那麼我們無法上傳新文件。請找到下面的代碼。謝謝kendo ui上傳,只限制1個文檔

<div class="configuration k-widget k-header"> 
    <span class="infoHead">Information</span> 
    <p> 
     The Upload can be used as a drop-in replacement 
     for file input elements. 
    </p> 
    <p> 
     This "synchronous" mode does not require 
     special handling on the server. 
    </p> 
</div> 
<form method="post" action='@Url.Action("Submit")' style="width:45%"> 
    <div> 
     @(Html.Kendo().Upload() 
      .Name("files") 
     ) 
     <p> 
      <input type="submit" value="Submit" class="k-button" /> 
     </p> 
    </div> 
</form> 

回答

0

如果你正在使用JavaScript/HTML5版本:

$("#selctor").kendoUpload({ "multiple": false });