Jquery 如何使用kendo ui upload为我们正在上载的图像命名友好名称
我有一个要求,我需要提供一个额外的名称,我上传的文件。 因此,在模板中,我给出了一个文本框。我需要将文本框值传递给控制器,并需要保存文件友好名称 但是,我需要为重复或不重复的文件提供值。如果文件是重复的,我将阻止在onupload函数中上载该文件。但如果友好名称重复,则该文件将被删除。我想在upload控件中查看文件,即使我们使用e.preventDefault方法 文件上载模板:Jquery 如何使用kendo ui upload为我们正在上载的图像命名友好名称,jquery,kendo-ui,kendo-asp.net-mvc,knockout-mvc,Jquery,Kendo Ui,Kendo Asp.net Mvc,Knockout Mvc,我有一个要求,我需要提供一个额外的名称,我上传的文件。 因此,在模板中,我给出了一个文本框。我需要将文本框值传递给控制器,并需要保存文件友好名称 但是,我需要为重复或不重复的文件提供值。如果文件是重复的,我将阻止在onupload函数中上载该文件。但如果友好名称重复,则该文件将被删除。我想在upload控件中查看文件,即使我们使用e.preventDefault方法 文件上载模板: <script id="fileTemplate" type="text/x-kendo-template"
<script id="fileTemplate" type="text/x-kendo-template">
<span class='k-progress'></span>
<div class='file-wrapper'>
<img id="campaignImage" height="40" width="40" />
<i class='file-heading file-name-heading'>#=name#</i>
<input type='text' id="txtFriendlyName" class="form-control" placeholder="Alt text" />
<button type='button' class='k-upload-action'></button>
</div>
</script>
为什么不使用MVC包装器?将友好名称文本框移到文件上载程序的外侧,并将其作为附加参数传递给controller@HaBo对于这种情况,我只使用单一上传,我想上传多个图像,并希望为图像指定不同的名称。那我怎么做呢。
<script id="fileTemplate" type="text/x-kendo-template">
<span class='k-progress'></span>
<div class='file-wrapper'>
<img id="campaignImage" height="40" width="40" />
<i class='file-heading file-name-heading'>#=name#</i>
<input type='text' id="txtFriendlyName" class="form-control" placeholder="Alt text" />
<button type='button' class='k-upload-action'></button>
</div>
</script>